Poti citi mai multe informatii la: http://www.phpmyadmin.net/documentation/[2.3] The error message "Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)..." is displayed. What can I do?
For RedHat users, Harald Legner suggests this on the mailing list:
On my RedHat-Box the socket of MySQL is /var/lib/mysql/mysql.sock. In your php.ini you will find a line
mysql.default_socket = /tmp/mysql.sock
change it to
mysql.default_socket = /var/lib/mysql/mysql.sock
Then restart apache and it will work.
Here is a fix suggested by Brad Ummer in the phpwizard forum:
* First, you need to determine what socket is being used by MySQL.
To do this, telnet to your server and go to the MySQL bin directory. In this directory there should be a file named mysqladmin. Type ./mysqladmin variables, and this should give you a bunch of info about your MySQL server, including the socket (/tmp/mysql.sock, for example).
* Then, you need to tell PHP to use this socket.
Assuming you are using PHP 3.0.10 or better, you can specify the socket to use when you open the connection. To do this in phpMyAdmin, you need to complete the socket information in the config.inc.php3.
For example: $cfg['Servers'][$i]['socket'] = '/tmp/mysql.sock';
Please also make sure that the permissions of this file allow to be readable by your webserver (i.e. '0755').
Have also a look at the corresponding section of the MySQL documentation.
mysql?
- danielt
- Mesaje: 1176
- Membru din: 18-Oct-2002, 13:02:29
- Versiune: 3.0.5
- Ext: Nu
- Server: UNIX/Linux
- Nivel phpBB: Mediu
- Nivel php: Mediu
- Localitate: Timişoara
- Contact:
Serverul tau nu este bine configurat!
- bogdan
- Mesaje: 10888
- Membru din: 18-Oct-2002, 13:14:27
- Versiune: 3.0.11
- Ext: Da
- Server: UNIX/Linux
- Nivel phpBB: Experimentat
- Nivel php: Mediu
- Localitate: Bucuresti
- Contact:
pentru mai multe informatii, folositi view_external.php?f=24 !
- octaviansan
- Utilizator înregistrat
- Mesaje: 1124
- Membru din: 28-Iun-2006, 13:56:23
- Ext: Nu
- Server: Windows
- Nivel phpBB: Mediu
- Nivel php: Mediu
- Localitate: Bucureşti, RO
- Contact:
-
- Utilizator înregistrat
- Mesaje: 20
- Membru din: 10-Mai-2010, 16:16:06
- Versiune: 3.0.9
- Ext: Nu
- Server: UNIX/Linux
- Nivel phpBB: Experimentat
- Nivel php: Mediu
- Localitate: Satu mare
- Contact:
Re: mysql?
am primit si eu eroare asta... si nu ii dau de cap ... am adaugat si
Edit /etc/my.cnf to reflect the location and owner of your MySQL database. The file should look something like this:
[mysqld]
user=btevdocd
datadir=/www/database/mysql
socket=/www/database/mysql/mysql.sock
skip-innodb
[mysql.server]
user=btevdocd
basedir=/www/database
[client]
user=btevdocd
socket=/www/database/mysql/mysql.sock
[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
dar nimic.. poate nu am adaugat unde trebe... nu mai stiu ce sa ii fac
Edit /etc/my.cnf to reflect the location and owner of your MySQL database. The file should look something like this:
[mysqld]
user=btevdocd
datadir=/www/database/mysql
socket=/www/database/mysql/mysql.sock
skip-innodb
[mysql.server]
user=btevdocd
basedir=/www/database
[client]
user=btevdocd
socket=/www/database/mysql/mysql.sock
[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
dar nimic.. poate nu am adaugat unde trebe... nu mai stiu ce sa ii fac
- bogdan
- Mesaje: 10888
- Membru din: 18-Oct-2002, 13:14:27
- Versiune: 3.0.11
- Ext: Da
- Server: UNIX/Linux
- Nivel phpBB: Experimentat
- Nivel php: Mediu
- Localitate: Bucuresti
- Contact:
Re: mysql?
Care e eroarea? Ce versiune folosesti?
Folosesti un tool ce include mysql (XAMPP, EasyPHP, ...)?
Folosesti un tool ce include mysql (XAMPP, EasyPHP, ...)?
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 2 vizitatori