Install phpmyadmin
1) sudo apt-get install phpmyadmin Select Y when necessary Select Apache >Enter Configure database for phpmyadmin with dbconfig-common? > Select Yes >Enter Add passwords, or leave empty and click Enter 2) Open file /etc/apache2/apache2.conf At the bottom add the line: Include /etc/phpmyadmin/apache.conf 3) Navigate to /etc/phpmyadmin change this line $cfg['Servers'][$i]['host'] = $dbserver; to: :$cfg['Servers'][$i]['host'] = 'localhost'; to Change $cfg['Servers'][$i]['controluser'] = $dbuser; $cfg['Servers'][$i]['controlpass'] = $dbpass; to $cfg['Servers'][$i]['controluser'] = 'root'; $cfg['Servers'][$i]['controlpass'] = ''; uncomment the line // $cfg['Servers'][$i]['AllowNoPassword'] = TRUE; to $cfg['Servers'][$i]['AllowNoPassword'] = TRUE; Restart apache and open your page in a browser to a url like: example.com/phpmyadmin You should be able to login with root and no password. If you login and see the databases, that is a good start. But, the security needs fixing right away. Comment the AllowNoPassword line. // $cfg['Servers'][$i]['AllowNoPassword'] = TRUE; Update your mysql root password mysqladmin -u root password your-new-password sudo /etc/init.d/mysql restart Update a mysql user password: SET PASSWORD FOR root@'localhost' = PASSWORD('password'); The mysql password is the one for which you will login to phpmyadmin. Disable root logins $cfg['Servers'][$i]['AllowRoot'] = FALSE; Create a new user in mysql mysql> CREATE USER 'test'@'localhost' IDENTIFIED BY 'mypassword'; mysql> GRANT ALL PRIVILEGES ON * . * TO 'test'@'localhost';
To remove a user
mysql> DROP user 'test'@'localhost'
© 2018 ALL Rights Reserved | Sitemap
Vancouver | North Vancouver | Burnaby | Richmond | Coquitlam | Port Coquitlam | Surrey | Langley | Maple Ridge | Mission | Abbotsford | Kamloops | Kelowna | Victoria | Squamish | Whistler | Pemberton