@skaparate Iām back⦠here is another issue I run into.
I was trying to setup mySQL server using octoberCMS 's instruction, but somehow it returns me this error :
SQLSTATE[HY000] [1045] Access denied for user ārootā@ālocalhostā (using password: YES)
so I started doing these steps until I run into another error
// 1. stop mySQL
sudo /etc/init.d/mysql stop
// 2. Start MySQL in safe mode
sudo mysqld_safe --skip-grant-tables &
// the result I get:
[1] 7770
ā ~ 2020-02-07T19:42:08.681349Z mysqld_safe Logging to syslog.
2020-02-07T19:42:08.686942Z mysqld_safe Logging to '/var/log/mysql/error.log'.
2020-02-07T19:42:08.698297Z mysqld_safe Directory '/var/run/mysqld' for UNIX socket file don't exists.
[1] + 7770 exit 1 sudo mysqld_safe --skip-grant-tables
// 3. Log into MySQL using root
mysql -uroot
// ERROR I GET
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
the issue description on stackoverflow is this :
I once had this problem and solved it by installing mysql-server
, so make sure that you have installed the mysql-server
, not the mysql-client
or something else.
That error means the file /var/run/mysqld/mysqld.sock
doesnāt exists, if you didnāt install mysql-server
, then the file would not exist. But if the mysql-server
is already installed and is running, then you need to check the config files.
The config files are:
/etc/my.cnf
/etc/mysql/my.cnf
/var/lib/mysql/my.cnf
In /etc/my.cnf
, the socket file config may be /tmp/mysql.sock
and in /etc/mysql/my.cnf
the socket file config may be /var/run/mysqld/mysqld.sock
. So, remove or rename /etc/mysql/my.cnf
, let mysql use /etc/my.cnf
, then the problem may solved.
my own issue right now is : I cannot find var/run/mysqld folder. the folder does not exist, but I do have mysql-server installed, I checked it using this command and it returns me this error
ā ~ sudo systemctl status mysql
ā mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Sat 2020-02-08 03:41:23 CST; 5min ago
Process: 7398 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code=exited, status=0/SUCCESS)
Process: 7389 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 7400 (code=exited, status=0/SUCCESS)
Feb 08 03:40:06 zhouxiang-ThinkPad-E495 systemd[1]: Starting MySQL Community Server...
Feb 08 03:40:06 zhouxiang-ThinkPad-E495 systemd[1]: Started MySQL Community Server.
Feb 08 03:41:21 zhouxiang-ThinkPad-E495 systemd[1]: Stopping MySQL Community Server...
Feb 08 03:41:23 zhouxiang-ThinkPad-E495 systemd[1]: Stopped MySQL Community Server.
so I donāt know what to do right now .