Installing Php7, Mysql, Phpmyadmin on Debian/ Ubuntu

Since PHP7 is prerequisite for Drupal8, I had to upgrade the Php version to 7 from 6 and also the Mysql versions which certainly introduced multiple changes in the implementation. 
Following are some of the links which were extremely useful in setting up the LAMP setup correctly. 
– ( For installing Php7 )
It is important to know that once you have upgraded to MySQL to Version 5.7, you cannot login into PhpMyadmin as the root user. Following link helped me understand that.

1. Run mysql_secure_installation to remove the test database and any extraneous user permissions added during the initial installation process:2. sudo mysql_secure_installation3. It is recommended that you select yes (y) for all questions. If you already have a secure root password, you do not need to change it.
Set Up a MySQL DatabaseNext, you can create a database and grant your users permissions to use databases.1. Log in to MySQL:2. mysql -u root -p3. Enter MySQL’s root password when prompted. 4. Create a database and grant your users permissions on it. Change the database name (webdata) and username (username). Change the password (password):5. Create database webdata;6. Grant all on webdata.* to ‘username’ identified by ‘password’;7. Exit MySQL:8. Quit
Some of the commands which always help me while reinstalling Php7, PMA, MYSQL are:- – UPDATE mysql.user SET Password=PASSWORD(‘password’) WHERE User=’root’;FLUSH PRIVILEGES; – CREATE USER ‘newuser’@’localhost’ IDENTIFIED BY ‘password’; ( This is for creating a new user which you will use for logging into PMA as root users cannot login from Mysql 5.7 onwards)- GRANT ALL PRIVILEGES ON * . * TO ‘newuser’@’localhost’; ( This is used for granting super user permissions to the new user created ).

Leave a Reply

Your email address will not be published. Required fields are marked *