Advertisement
Guest User

Untitled

a guest
Sep 5th, 2017
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.26 KB | None | 0 0
  1. #1698 - Access denied for user 'root'@'localhost'
  2.  
  3. sudo mysql --user=root mysql
  4.  
  5. CREATE USER 'phpmyadmin'@'localhost' IDENTIFIED BY 'some_pass';
  6. GRANT ALL PRIVILEGES ON *.* TO 'phpmyadmin'@'localhost' WITH GRANT OPTION;
  7. FLUSH PRIVILEGES;
  8.  
  9. CREATE USER 'phpmyadmin'@'%' IDENTIFIED BY 'some_pass';
  10. GRANT ALL PRIVILEGES ON *.* TO 'phpmyadmin'@'%' WITH GRANT OPTION;
  11. FLUSH PRIVILEGES;
  12.  
  13. # dbc_dbuser: database user
  14. # the name of the user who we will use to connect to the database.
  15. dbc_dbuser='phpmyadmin'
  16.  
  17. # dbc_dbpass: database user password
  18. # the password to use with the above username when connecting
  19. # to a database, if one is required
  20. dbc_dbpass='some_pass'
  21.  
  22. sudo apt-get -y install mariadb-server mariadb-client
  23. sudo mysql_secure_installation (answer to some interactive questions):
  24. Enter current password for root (enter for none): <enter>
  25. Set root password: n
  26. Remove anonymous users: n
  27. Disallow root login remotely: n
  28. Remove test database and access to it: n
  29. Reload privilege tables now: Y
  30.  
  31. sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-5.5 mysql-client-core-5.5
  32. sudo rm -rf /etc/mysql /var/lib/mysql
  33. sudo apt-get autoremove
  34. sudo apt-get autoclean
  35.  
  36. sudo apt-get -y install phpmyadmin (and answer some interactive questions)
  37. Configuring phpmyadmin:
  38. Web server to reconfigure automatically: apache2
  39. Configure database for phpmyadmin with dbconfig-common: Yes
  40. MySQL application password for phpmyadmin: <blank>
  41.  
  42. sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
  43. sudo a2enconf phpmyadmin.conf
  44. sudo service apache2 restart
  45.  
  46. sudo dpkg-reconfigure phpmyadmin
  47. <Ok>
  48. Reinstall database for phpmyadmin: <Yes>
  49. Connection method for MySQL database server for phpmyadmin: TCP/IP
  50. Host name of the MySQL database server for phpmyadmin: localhost
  51. Port number for the MySQL service: 3306
  52. MySQL database name for phpmyadmin: phpmyadmin
  53. <Ok>
  54. MySQL username for phpmyadmin: root
  55. MySQL application password for phpmyadmin: pass # OR ANY PASSWORD YOU WANT
  56. Password confirmation: pass
  57. Name of the database's administrative user: root
  58. Web server to reconfigure automatically: apache2
  59. An error occurred while installing the database: ignore
  60.  
  61. username: root
  62. password: pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement