Created
December 12, 2016 22:46
-
-
Save leotm/0c6c0df98dc5854854e880e7e03b2055 to your computer and use it in GitHub Desktop.
Setup MySQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check process with: ps -ef | grep mysql OR ps aux|grep mysql | |
pkill mysqld | |
mysqld_safe --skip-grant-tables & | |
mysql -u root | |
FLUSH PRIVILEGES; | |
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('foobar'); | |
quit | |
pkill mysql_safe | |
service mysql start | |
# now u good 2 go | |
mysql -u root -p # or | |
mysql_secure_installation | |
# Notes on shit i tried: | |
# /etc/init.d/mysql stop | |
# sudo dpkg-reconfigure mysql-server-5.7 | |
# Deleted then remade /etc/mysql/mysqld.conf.d | |
# Could not create unix socket lock file /var/run/mysqld/mysqld.sock.lock | |
# cd ~ | |
# echo "ALTER USER 'root'@'localhost' IDENTIFIED BY 'test';" > mysql-init.txt | |
# sudo mysqld --user=root --init-file=~/mysql-init.txt | |
# sudo mysql --user=root & | |
# sudo mysqld --user=root & | |
# mysqld start | |
# service mysql start | |
# service mysql restart | |
# Check: var/log/mysql/error.log | |
# chown -R mysql.mysql /var/lib/mysq | |
# telnet 127.0.0.1 3306 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment