Problem connecting to mysql via cmd line.

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Problem connecting to mysql via cmd line.

Postby acolic » 23. May 2006 19:07

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
acolic
 
Posts: 4
Joined: 23. May 2006 19:01

Postby deepsurfer » 24. May 2006 16:10

must point to the path of XAMPP-MySQL

e.g.
/opt/lampp/bin/mysql -uroot -pPassWord -hlocalhost DBNAME < file.sql
chirio Deep
Wie sagte einst der MCP aus Tron auf dem Bildschirm zu schreiben Pflegte
" ... end of communication ... "
User avatar
deepsurfer
AF Moderator
 
Posts: 6440
Joined: 23. November 2004 10:44
Location: Cologne
Operating System: Win-XP / Win7 / Linux -Debian

Postby Wiedmann » 24. May 2006 16:23

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
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby acolic » 25. May 2006 14:00

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
acolic
 
Posts: 4
Joined: 23. May 2006 19:01

Postby Wiedmann » 25. May 2006 14:48

[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".
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby acolic » 25. May 2006 15:20

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
acolic
 
Posts: 4
Joined: 23. May 2006 19:01

Postby Wiedmann » 25. May 2006 16:02

Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby acolic » 25. May 2006 16:08

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
acolic
 
Posts: 4
Joined: 23. May 2006 19:01


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 40 guests