All "recipes" from this post are for FreeBSD (10.3).
How to completely change MySQL 5.6 with 5.7?
NB, please, that this approach will cause wiping of all MySQL data from your host.
- sudo pkg remove mysql56-client # will remove the server too
- sudo rm -rd /var/db/mysql /usr/local/etc/mysql
- sudo pkg install mysql57-server # will install the client too
Start MySQL
- sudo service mysql-server onestart
Auto start MySQL after the system boots
- sudo cp /etc/rc.conf /etc/rc.conf.old
- echo 'mysql_enable="YES"' >> /etc/rc.conf
First time login as DB server admin
- sudo cat /root/.mysql_secret # remember the PASSWORD
- mysql -u root -p # type the PASSWORD from /root/.mysql_secret
Reset password before usage of MySQL
Execute the next request in the MySQL monitor.
- SET PASSWORD = PASSWORD('vs?!h(y=/!er');
Create a regular user account
- CREATE USER IF NOT EXISTS 'vasilyb'@'localhost' IDENTIFIED BY '21212121' PASSWORD EXPIRE;
Remove a user account
- DROP USER 'jeffrey'@'localhost';
Комментариев нет:
Отправить комментарий