I believe from my point you haven't run mysql_secure_installation which help to enables and set password base auth for user root. Show As you already mention that you follow that link where they haven't set the password for the root user they only create a standard user for their database. Now how you can solve it all you need to do is run the below commands in order. First, open the terminal by Ctrl+Alt+T or just search for the terminal. Take the sudo access by running the below command:
It will give you root access to your laptop. you can also avoid taking the root access but for that, you need to run every command using sudo at beginning of every command. Run the security script with sudo:
This will take you through a series of prompts where you can make some changes to your MySQL installation’s security options. Select Y for every option you don't have to worry about anything it's just a just basic configuration of MySQL once you are done with that now take access to your Mysql server:
The password is which you have set up while running the command of sudo mysql_secure_installation once you got into the terminal use create a user with all privileges. for the run the below command:
Warning: Don't run this command on the production server as such broad privileges should not be granted lightly, as anyone with access to this MySQL user will have complete control over every database on the server. Following this, it’s good practice to run the FLUSH PRIVILEGES command. This will free up any memory that the server cached as a result of the preceding CREATE USER and GRANT statements:
Then you can exit the MySQL client:
In the future, to log in as your new MySQL user, you’d use a command like the following:
The -p flag will cause the MySQL client to prompt you for your MySQL user’s password in order to authenticate. by coming this far your problem will solve. phpmyadmin-cli - bringing phpMyAdmin to the command-line. MySQL databases are often managed using the popular administration tool phpMyAdmin. Unfortunately, automation and scripting of the commands available in the web-based interface of phpMyAdmin can be cumbersome. phpmyadmin-cli provides a command-line interface for phpMyAdmin, providing easy command-line access to your MySQL database. Commands given on stdin are handed to phpMyAdmin to be executed on the MySQL database. The results of these commands are then printed to stdout. An interactive shell is also available. phpmyadmin-cli is written in Python. On most UNIX-like systems, you can install phpmyadmin-cli by running one of the following install commands as root or by using sudo. or pip install git+http://github.com/fdev/phpmyadmin-cli Usage
ExamplesImport a sql file
Export an entire database
Export specific tables
Execute a single query
Using the interactive shell
Known limitations
CompatibilityWhile phpmyadmin-cli should work with phpMyAdmin 3.x and 4.x, it has only been tested with on 3.3.10deb1, 3.4.4, 3.5.8.1deb1 and 4.1.11. Frequently Asked QuestionsQ: Does phpmyadmin-cli work over https? A: Yes it does. You can ignore bad certificates using the Q: Was this an April Fools joke? A: Yes, you should obviously use the mysql command when available. However, the application does fully work as described and, unfortunately, actual use cases for this application do exist. This application is not affiliated with or endorsed by the phpMyAdmin Project or its trademark owners. How do I access phpMyAdmin from commandAccess the phpMyAdmin console through the secure SSH tunnel you created, by browsing to http://127.0.0.1:8888/phpmyadmin. Log in to phpMyAdmin by using the following credentials: Username: root. Password: application password.
How do I access my phpMyAdmin?Once phpMyAdmin is installed point your browser to http://localhost/phpmyadmin to start using it. You should be able to login using any users you've setup in MySQL. If no users have been setup, use admin with no password to login. Then select Apache 2 for the webserver you wish to configure.
How do I log into phpMyAdmin on Windows?You should be able to access phpMyAdmin directly, by browsing to http://127.0.0.1/phpmyadmin. Log in to phpMyAdmin by using the following credentials: Username: root. Password: The same as the application password.
How do I access MySQL commandLaunch the MySQL Command-Line Client. To launch the client, enter the following command in a Command Prompt window: mysql -u root -p . The -p option is needed only if a root password is defined for MySQL. Enter the password when prompted.
|