Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: gixmo on May 26, 2007, 01:24:33 PM
-
I cannot access my mysql based sites anymore (joomla and phpgedview)
i get this error :
DB Error: connect failed [nativecode=Access denied for user 'admin'@'localhost' (using password: YES)] ** Array
so far i've tried the following :
cd /var/service/mysqld
runsvctrl d .
expand-template /root/.my.cnf
expand-template /var/service/mysqld/set.password
/usr/libexec/mysqld --bootstrap --user=mysql --skip-grant-tables < ./set.password
runsvctrl u .
like in the wiki was told.
i have also tried :
mysql --execute="grant all privileges on *.* to admin@localhost identified by 'admin' WITH GRANT OPTION"
mysql --execute="flush privileges"
but that didn't did the trick either.
Please help!
-
DB Error: connect failed [nativecode=Access denied for user 'admin'@'localhost' (using password: YES)] ** Array
mysql --execute="grant all privileges on *.* to admin@localhost identified by 'admin' WITH GRANT OPTION"
mysql --execute="flush privileges"
You do NOT want the user 'admin' for this access. This is not advisable for security reasons. Use a non-priviledged user with his own password. I am sure if you search you will find some references to db access with php apps.
References may use 'admin' in their instruction but this is not advisable ;-)
Craig
-
you are absolutely right. And i will do that in the future, but for now i still can't access my website because it uses admin instead of antoher user. So how can i fix my problem?
-
Change the config file/s for your apps to reflect a different user. Then grant privileges to that user to that db only in your mysql commands, with a unique password for that user. Reflect these in your config file and you should regain access.
[root@jensen-server ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1367 to server version: 4.1.20
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> grant all on yourdb.* to yourdb_user@localhost identified by 'kHEv+UrJx4chpzhc88uApbU10InhdL0s9ujcvbd9VqIBgkRPfclLfHINjrN3fQhB67k1zkeQ';
then
mysql> flush privileges;
Query OK, 0 rows affected (0.07 sec)
mysql> \q
Craig
-
Thanks Craig,
it was a lot of work to reconfigure all my apps but finaly everything works fine now!