I am trying to change my password with mysql, and I am not a smart man...
I have done google search after google search, and done everything I can to resolve the issue.
I am on Ubuntu 16.04, if that helps at all.
I type the command:
$ mysqladmin -u root password newpass
and I get:
mysqladmin: connect to server at 'localhost' failed error:
'Can't connect to local MySQL server through socket /var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Any suggestions?
Also, I recently had followed some directions to add password to phpmyadmin from this page.
This is what caused me to have the issue that I am trying to resolve, if that makes sense at all.
Any help would be greatly appreciated.
Edit:
sudo service start mysql
produced:
start: unrecognized service
Tried this instead:
service mysql start
and it started. then tested the status using:
service mysql status
produced:
● mysql.service - LSB: Start and stop the mysql database server daemon
Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled)
Active: active (exited) since Fri 2017-01-06 12:17:04 CST; 2h 38min ago
Docs: man:systemd-sysv-generator(8)
Edit 2:
sudo service mysql stop && sudo service mysql start && sudo service mysql status
[sudo] password for logan:
● mysql.service - LSB: Start and stop the mysql database server daemon
Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled)
Active: active (exited) since Mon 2017-01-09 09:11:39 CST; 16ms ago
Docs: man:systemd-sysv-generator(8)
Process: 6014 ExecStop=/etc/init.d/mysql stop (code=exited, status=0/SUCCESS)
Process: 6050 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS
Jan 09 09:11:39 logan-Latitude-E6320 systemd[1]: Starting LSB: Start and stop th
Jan 09 09:11:39 logan-Latitude-E6320 systemd[1]: Started LSB: Start and stop the
Edit 3:
I tried another method, hopefully this information is useful...
logan@logan-Latitude-E6320:~$ ps -ef | grep mysql
logan 8096 7119 0 13:21 pts/1 00:00:00 grep --color=auto mysql
root 19832 1244 0 Jan06 ? 00:00:00 /bin/sh /opt/lampp/bin/mysqld_safe --datadir=/opt/lampp/var/mysql --pid- file=/opt/lampp/var/mysql/logan-Latitude-E6320.pid
mysql 19975 19832 0 Jan06 ? 00:00:10 /opt/lampp/sbin/mysqld --basedir=/opt/lampp --datadir=/opt/lampp/var/mysql --plugin- dir=/opt/lampp/lib/mysql/plugin/ --user=mysql --log- error=/opt/lampp/var/mysql/logan-Latitude-E6320.err --pid- file=/opt/lampp/var/mysql/logan-Latitude-E6320.pid -- socket=/opt/lampp/var/mysql/mysql.sock --port=3306
service start mysql
– slowko Jan 06 '17 at 20:39