### 遇到的问题,mysql连接时没有 mysql.sock
[root@test bin]# mysql -uroot -p Enter password:? ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
进入 mysql 文件夹
cd /root/mysql-8.0.14-linux-glibc2.12-x86_64/bin
修改 my.conf? vi /root/mysql-8.0.14-linux-glibc2.12-x86_64/my.cnf
[mysqld] max_allowed_packet = 32M character-set-server = utf8 key_buffer_size = 128M innodb_buffer_pool_size = 4096M tmp_table_size = 1024M max_connections=3000 max_user_connections=3000 lower_case_table_names=1 socket=/var/lib/mysql/mysql.sock user=root # 以 root 身份启动 symbolic-links=0 lower_case_table_names = 1
[mysql_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid
[client] port=3306 socket=/var/lib/mysql/mysql.sock
以 root 身份启动 mysqld --user=root ?--lower-case-table-names=1 & ?
|