Warning: include_once(/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/menu.php): failed to open stream: No such file or directory in /home/users/2/moriya-h5/web/confrage/linux/CentOS/mysql/root_password/root_password.html on line 29

Warning: include_once(): Failed opening '/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/menu.php' for inclusion (include_path='.:/usr/local/php/5.6/lib/php') in /home/users/2/moriya-h5/web/confrage/linux/CentOS/mysql/root_password/root_password.html on line 29
 
トップページ >  CentOS >  rootのパスワード設定
初版2010/06/01: 最終更新日2010/06/01
rootのパスワード設定
目次
rootのパスワード設定
rootのパスワード設定
mysqlのrootのパスワードはデフォルトなしなので、不正アクセスされる恐れがあります。
なので、rootのパスワードを設定します。

mysql -u root

select user,host from mysql.user;
+------+-----------+----------+
| user | host      | password |
+------+-----------+----------+
| root | localhost |          | 
| root | host      |          | 
| root | 127.0.0.1 |          | 
+------+-----------+----------+
3 rows in set (0.00 sec)

set password for root@localhost=password('12345678');

set password for root@host=password('12345678');

set password for root@127.0.0.1=password('12345678');
というように設定します。
上記例はパスワードを12345678に設定した例です。


Warning: include_once(/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/side_bar.php): failed to open stream: No such file or directory in /home/users/2/moriya-h5/web/confrage/linux/CentOS/mysql/root_password/root_password.html on line 96

Warning: include_once(): Failed opening '/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/side_bar.php' for inclusion (include_path='.:/usr/local/php/5.6/lib/php') in /home/users/2/moriya-h5/web/confrage/linux/CentOS/mysql/root_password/root_password.html on line 96