app教程网 学习教程 mysql数据库中文乱码如何解决(mysql启动不了服务怎么解决)

mysql数据库中文乱码如何解决(mysql启动不了服务怎么解决)

解决MySQL无法通过mysql.sock连接的问题,主要提示是无法通过'/tmp/mysql.sock '连接服务器,php的标准配置只是使用'/tmp/mysql.sock '

Look for this by yourself or use this method: ln-s/var/lib/MySQL/MySQL. Sock/tmp/MySQL. Sock. There is an error message in the instructions of phpmyadmin: "Warning: MySQL connection failed: unable to connect to the local MySQL server through socket '/tmp/mysql.sock' (111) ." has been displayed. what can I do? For RedHat users, Harald Legner suggested the following in the mailing list: In my RedHat-Box, the socket of mysql is/var/lib /var/lib/mysql/mysql.sock In php.ini, you will find a line MySQL. default _ socket=/tmp/MySQL.sock, and 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.php

3. For example: $cfg['Servers'][$i]['socket']='/tmp/mysql.sock'; (T113)

本文来自网络,不代表本站立场,转载请注明出处:https: