Posted by mafiaid on 12 February 2008
If you are using a older version of php connecting to a recent mysql (like os X Server 10.4 has) you will probably need to use the OLD_PASSWORD function in your SQL when creating the user or setting the password.
Normally you might do something like this to set a users password:
SET PASSWORD FOR root@localhost = PASSWORD('mypassword');
Whereas if you see this message from php:
"Client does not support authentication protocol requested by server; consider upgrading MySQL client"
You will almost certainly need to use the OLD_PASSWORD function to encrypt the password, like this:
SET PASSWORD FOR root@localhost = OLD_PASSWORD('mypassword');
This is documented more in the MySQL Reference Manual.
Posted in mysql, oprekan | Tagged: mysql, OLD_PASSWORD | Leave a Comment »
Posted by mafiaid on 22 November 2007
1. Create the MySQL database:
# mysqladmin –user=root create cacti
2. Create a mysql user/password for cacti:
(change user and/or password if requered)
# echo “GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY ‘cactiuser’; FLUSH PRIVILEGES;” | mysql
3. Import the default cacti database:
# mysql cacti < /usr/local/share/cacti/cacti.sql
4. Edit /usr/local/share/cacti/include/db-settings.php.
5. Add a line to your /etc/crontab file similar to:
*/5 * * * * cacti /usr/local/bin/php /usr/local/share/cacti/poller.php > /dev/null 2>&1
6. Add alias in apache config for the cacti dir:
Alias /cacti “/usr/local/share/cacti/”
7. Be sure apache gives an access to the directory (‘Allow from’ keywords).
8. Open a cacti login page in your web browser and login with admin/admin.
Just need MySQL Command for my documentations
mysql> SET PASSWORD FOR
-> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');
Posted in mysql, oprekan | Tagged: mysql, oprekan | Leave a Comment »
Posted by mafiaid on 3 September 2007
shell> mysql --user=root mysql
mysql> GRANT ALL PRIVILEGES ON *.* TO monty@localhost
-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON *.* TO monty@"%"
-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
mysql> GRANT RELOAD,PROCESS ON *.* TO admin@localhost;
mysql> GRANT USAGE ON *.* TO dummy@localhost;
Tags: oprekan, mysql
Posted in mysql, oprekan | Leave a Comment »