Such as the title: How to build a mysql environment on Alibaba Cloud server ecs by yourself. If you use npm install (node is installed), how to modify the mysql configuration file
Always report an error
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
I tried many online solutions, such as adding skip-grant-tables
to skip entering the password, but my mysql restart is not easy to use
[root@iZ2ze6yh0lvendgbwk6k4tZ ~]# service mysqld restart
Stopping mysqld: [ OK ]
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
Server novice please give me some advice
Install mysql
yum installation
Binary package installation
Compile and install
mysql startup error
Start the error report and look at the error log of mysql
Login permission error,
skip-grant-tables
After skipping, change the mysql user passwordSolved, my problem:
skip grunt tables
放错位置了 我放在[mysqld_safe]
的块下面了 放在[mysqld]
That’s itThe next restart failed. Looking at the error log, 3306 was occupied.
kill -9 [pid]
发现杀掉后立刻重启,我用kill [pid]
Kill directly and found that the 3306 port was not occupiedNext, connect to mysql. The error message is that there is no mysql.sock file. Maybe I deleted it by mistake before. I restarted the server and then
service mysqld restart
重启,找到了mysql.sock ,之后发现my.cnf 文件下的socket位置与它找的不一样,用ln -s
soft-connected itFinally successful~