To login to MySQL on Linux, follow these steps:
1. Open a terminal on your Linux machine.
2. Type the following command to log in to MySQL:
mysql -u -p
Replace `
` with the MySQL username you want to log in with.
3. Press Enter. If the MySQL username and password are correct, you will be logged in to the MySQL shell.
Alternatively, if you want to log in as the root user, you can type the following command:
sudo mysql
You will then be prompted to enter your system password before you can log in to MySQL.
Once you"re logged in, you can start executing MySQL commands and managing your databases.
贊同0