MariaDB の インストール
MariaDB をインストールします。
root@www:~# apt -y install mariadb-server
初期設定します。
root@www:~# mysql_secure_installation
Enter current password for root (enter for none):
Set root password? [Y/n] y New password: Re-enter new password:
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y
root@www:~# mysql -u root -p Enter password:
MariaDB [(none)]> select user,host,password from mysql.user; +------+-----------+-------------------------------------------+ | user | host | password | +------+-----------+-------------------------------------------+ | root | localhost | ***************************************** | | root | 127.0.0.1 | ***************************************** | | root | ::1 | ***************************************** | +------+-----------+-------------------------------------------+ 3 rows in set (0.00 sec)
MariaDB [(none)]> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | +--------------------+ 3 rows in set (0.00 sec)
MariaDB [(none)]> exit
phpMyAdmin のインストール
「apache2」、「PHP」をインストールして起動しておきます。
root@www:~# apt -y install phpmyadmin php-mbstring php-zip php-gd php-json php-curl
root@www:~# vi /etc/phpmyadmin/apache.conf
Require ip 127.0.0.1 192.169.1.1/24
root@www:~# mysql Enter password:
MariaDB [mysql]> update mysql.user set plugin='' where user='root';
MariaDB [mysql]> flush privileges;
MariaDB [mysql]> exit
root@www:~# systemctl restart apache2
http://ubuntuserver.jp/phpmyadmin/
コメント