User Tools

Site Tools


backup_database_from_remote_server

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
backup_database_from_remote_server [2016/08/03 08:52] walkeradminbackup_database_from_remote_server [2016/12/14 18:38] walkeradmin
Line 9: Line 9:
 \\  \\ 
 \\  \\ 
-1. Your user must have the rights (normally user accounts are localhost limited) I created a user with global rights '%'\\ +1. Your user must have the rights (normally user accounts are localhost limited) I created a user with global rights '%'
 \\  \\ 
-Comment these lines in /etc/mysql/my.cnf\\  +\\  
-skip-networking\\  +<file> 
-bind-address = 127.0.0.1\\ +CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password'; 
 + 
 +  EG: CREATE USER 'admin'@'%' IDENTIFIED BY 'password'; 
 +   
 +Once created, the user requires permissions 
 +   
 +  GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost'; 
 +   
 +If you want to be able to access the server from anywhere, replace localhost with % 
 +   
 +  GRANT ALL PRIVILEGES ON * . * TO 'admin'@'%'; 
 +</file> 
 +\\  
 +\\  
 +<color red> SUPER IMPORTANT</color> Comment these lines in /etc/mysql/my.cnf\\ <>OR SQL WILL ONLY ACCEPT LOCAL CONNECTIONS</color> 
 +\\  
 +\\  
 +    skip-networking\\  
 +    bind-address = 127.0.0.1\\ 
 \\  \\ 
 2. You must have rights to write to the target directory (easily overlooked)\\  2. You must have rights to write to the target directory (easily overlooked)\\ 
 3. The backup might take a few minutes, be prepared to wait.\\  3. The backup might take a few minutes, be prepared to wait.\\ 
 \\  \\ 
 +    Now we can execute the following command: 
 +     
 +    mysqldump --host ipaddress -P port -u user -pPassword databasename > savename.sql 
 +     
 +    mysqldump --host 10.0.0.1 -P 3306 -u root -pRootPassword gallery > gallery.sql 
 +\\  
 +\\ 
  
          
backup_database_from_remote_server.txt · Last modified: 2023/03/09 22:35 by 127.0.0.1