Tag: mysql
-
MySQL user management from the command line
If phpMyAdmin is not installed on your server or if you don’t have access to it but instead have shell access, you can easily manage your MySQL database users from the command line. MySQL stores the list of users in the mysql.user table. List of all databases are stored in the mysql.db table. Show list…
-
Export / Import a MySQL database between remote server and local machine
Upload or download a MySQL database between a remote server and localhost using the Linux command line. Download a remote MySQL database Download a remote MySQL database using mysqldump dump. The output of the dump is compressed using gzip. This compressed file is then unzipped and downloaded into the file remotedb.sql. Copy local database to…
-
Create a new MySQL user from the command line
Create and add a user to a MySQL database using the command line. Run MySQL Open MySQL using the below command. The username should be your root user or an admin user with access for creating other users. Create a database and a user Create a new database (if required) and create a new user.…
-
Set MySQL password from the command line
If your MySQL root user’s password is currently empty (not set) and you want to add one to disable access without password, use the following commands. Open MySQL my entering the below in your command line: Here, mysql.user is the database which has the list of all the MySQL users. So the command breaks down…