MySQL: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 17: | Line 17: | ||
{{Root|mysql -u root -p}} | {{Root|mysql -u root -p}} | ||
{{ | {{Command|<nowiki>mysql> CREATE USER 'root'@'host.domain.local' IDENTIFIED BY 'xxx';</nowiki>}} | ||
{{ | {{Command|<nowiki>mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'host.domain.local' IDENTIFIED BY 'xxx' WITH GRANT OPTION;</nowiki>}} | ||
{{ | {{Command|<nowiki>mysql> FLUSH PRIVILEGES;</nowiki>}} | ||
Revision as of 09:57, 25 March 2014
Initial Configuration
# systemd-tmpfiles --create
# mysql_install_db --basedir=/usr --datadir=/var/lib/mysql --user=mysql
# systemctl start mysql.service
# mysql_secure_installation
Change the root password
# mysqladmin -u root password 'new-password'
Allow external connections, e.g. for phpMyAdmin
# mysql -u root -p
$ mysql> CREATE USER 'root'@'host.domain.local' IDENTIFIED BY 'xxx';
$ mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'host.domain.local' IDENTIFIED BY 'xxx' WITH GRANT OPTION;
$ mysql> FLUSH PRIVILEGES;