View previous topic :: View next topic |
Author |
Message |
baboo Senior Member
Joined: 04 Sep 2007 Posts: 676
|
Posted: Wed Oct 03, 2007 3:07 pm Post subject: native sms - mysql login |
|
|
I can't login to mysql. Have not made any changes, new install.
Not from webmin>mysql or command line. Tried mysql -u root -p then toor for password. Tried to create new password but ofcourse it won't let me.
thanks |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Wed Oct 03, 2007 3:39 pm Post subject: |
|
|
That's because I have not put a mysql password.
Type mysql -u root mysql and set password with the command Code: | mysql> set password for root@localhost=password('toor');
mysql> set password for root@sms=password('toor'); |
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
baboo Senior Member
Joined: 04 Sep 2007 Posts: 676
|
Posted: Wed Oct 03, 2007 3:50 pm Post subject: |
|
|
I'm sorry but that does not work. I type 'mysql -u root mysql' returns Access denied for user root@localhost.
your thoughts? |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Wed Oct 03, 2007 4:10 pm Post subject: |
|
|
type mysql -u root -p and press enter ( blank password)...
Try to check Webmin if can see mysql server and if it requires password.
If you messed up mysql's password try this simply script to reset it.
Code: | #!/bin/bash
kill `cat /var/lib/mysql/sms.pid`
echo "set password for root@localhost=password('toor');" > db.txt
mysqld_safe --init-file=db.txt
rm -rf db.txt
mysql -u root -p
|
_________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
baboo Senior Member
Joined: 04 Sep 2007 Posts: 676
|
Posted: Wed Oct 03, 2007 5:14 pm Post subject: |
|
|
I have not set a password. This is a new install and nothing has been done to it. When I tried to setup a password from command it gave me access denied.
I have a physical theray appointment now so I don't have the time to try the script. But will when I get back.
Its possible the install was corrupted but did not see any errors. I could try reinstalling native sms again.
thanks |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Wed Oct 03, 2007 5:37 pm Post subject: |
|
|
the "-p" argument is for connecting with password and not for creating a password and since mysql user root don't have a password may messed things up.
Maybe a simple mysql restart it's enough to fix the problem, or if you turn your PC on when you come back, try login without password.
If it requires password, try the script...
I don't believe that it's a corrupted installation, but you never know for sure.
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
baboo Senior Member
Joined: 04 Sep 2007 Posts: 676
|
Posted: Thu Oct 04, 2007 9:40 pm Post subject: solved |
|
|
turned out it was a bad install. Re-installed sms and now it works.
thanks |
|
Back to top |
|
|