Mysql Connection Problems

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

Mysql Connection Problems

Postby deejay » 29. July 2009 04:55

I'm a little confused about sockets ....

When I bring up the "XAMPP for Linux" (the orange page) i get:

Access denied for user 'root'@'localhost' (using password: NO) in /opt/lampp/htdocs/xampp/cds.php on line 64

(Note: In xampp security, I did set a root password)

When I try: /opt/lampp/bin/$ mysql -s root ... I get:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)


The "/opt/lampp/etc/my.cnf" file says:

# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /opt/lampp/var/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port = 3306
socket = /opt/lampp/var/mysql/mysql.sock
skip-locking
key_buffer = 16M

Any ideas? Please give detailed instructions ... I'm a newbie ...

Thanks
deejay
 
Posts: 4
Joined: 24. July 2009 18:22

Re: Mysql Connection Problems

Postby Wiedmann » 29. July 2009 07:48

Access denied for user 'root'@'localhost' (using password: NO) in /opt/lampp/htdocs/xampp/cds.php on line 64

(Note: In xampp security, I did set a root password)

If you set a password for the MySQL "root" user, the cds demo does not work anymore.

When I try: /opt/lampp/bin/$ mysql -s root ... I get:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

It must be:
Code: Select all
/opt/lampp/bin/$ ./mysql -u root
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Mysql Connection Problems

Postby deejay » 31. July 2009 01:27

Thanks for the reply.

When I try
root@ubuntu1:/opt/lampp/bin# ./mysql -u root .... I still get:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

Any other suggestions I could try?
deejay
 
Posts: 4
Joined: 24. July 2009 18:22

Re: Mysql Connection Problems

Postby Wiedmann » 31. July 2009 09:29

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

The user "root" have a password. Thus you have to use the password parameter.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 7 guests