MySQL: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 12: | Line 12: | ||
{{Root|<nowiki>mysqladmin -u root password 'new-password'</nowiki>}} | {{Root|<nowiki>mysqladmin -u root password 'new-password'</nowiki>}} | ||
== Allow external connections, e.g. for phpMyAdmin == | |||
{{Root|mysql -u root -p}} | |||
{{Code|mysql> CREATE USER 'root'@'host.domain.local' IDENTIFIED BY 'xxx';}} | |||
{{Code|mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'host.domain.local' IDENTIFIED BY 'xxx' WITH GRANT OPTION;}} | |||
{{Code|mysql> FLUSH PRIVILEGES;}} | |||
Revision as of 09:56, 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
| Code: mysql> CREATE USER 'root'@'host.domain.local' IDENTIFIED BY 'xxx'; |
|
{{{2}}} |
| Code: mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'host.domain.local' IDENTIFIED BY 'xxx' WITH GRANT OPTION; |
|
{{{2}}} |
| Code: mysql> FLUSH PRIVILEGES; |
|
{{{2}}} |