Page 1 of 1
Problem connecting to mysql via cmd line.
Posted:
23. May 2006 19:07
by acolic
Hi,
I've tried to connect to mysql from the cmd line.
I've run ./mysql -umysql -p, provided a password and got to the mysql shell. I can run most commands but when I try to create a database I get a Access denied for user error.
I've connect to mysql as -uroot and I still get the error.
Any suggestions?
Alex
Posted:
24. May 2006 16:10
by deepsurfer
must point to the path of XAMPP-MySQL
e.g.
/opt/lampp/bin/mysql -uroot -pPassWord -hlocalhost DBNAME < file.sql
Posted:
24. May 2006 16:23
by Wiedmann
I've run ./mysql -umysql -p, provided a password and got to the mysql shell. I can run most commands but when I try to create a database I get a Access denied for user error.
The user "mysql" exists in your installation?
If you have a XAMPP the predefined user is "root":
- Code: Select all
./mysql -u root -p
Posted:
25. May 2006 14:00
by acolic
I do have a mysql and root user.
I have logged in as root.
I then try to run
./mysql -uroot -p and I provide the password, the same one I used to log in and I get an access denied error.
If I log in with ./mysql -umysql -p
and provide the password for mysql I get an access denied. If I run
./mysql -umysql and don't provde a password I can get in but not create a database.
Any ideas?
Alex
Posted:
25. May 2006 14:48
by Wiedmann
[quote]/mysql -uroot -p and I provide the password, the same one I used to log in[/quote]
Used to log in where?
BTW:
The MySQL user "root" have nothing to do with your system user "root".
Posted:
25. May 2006 15:20
by acolic
Ok, my mistake. I thought system root was the same as the user root.
I log into my laptop with root. I then tried to run
./mysql -uroot. I thought they were the same.
Guess I'm wrong. Then on a default install of xampp, what is the username and password I should be using?
Alex
Posted:
25. May 2006 16:02
by Wiedmann
Posted:
25. May 2006 16:08
by acolic
Hi,
I should have been clearer. When I installed xampp I ran the security check and gave the mysql root user a password. I have tried entering the password and I get errors.
I know what the password is as I wrote it down so I'm not sure what is going on.
Is there a way to reset the pwd for root?
I notice on the mysql web site you can do that by starting mysql with "--skip-grant-tables --user=root " options. Any idea how to start mysql from the command line and pass these options?
Alex