mirror of
				https://github.com/ansible-collections/community.general.git
				synced 2024-09-14 20:13:21 +02:00 
			
		
		
		
	Fixes #4720 Use mysql command to restore database instead of mysqldump
This commit is contained in:
		
							parent
							
								
									536b5b196f
								
							
						
					
					
						commit
						d3c8832414
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -129,13 +129,13 @@ def db_dump(module, host, user, password, db_name, target, socket=None): | |||
|     return rc, stdout, stderr | ||||
| 
 | ||||
| def db_import(module, host, user, password, db_name, target, socket=None): | ||||
|     cmd = module.get_bin_path('mysqldump', True) | ||||
|     cmd = module.get_bin_path('mysql', True) | ||||
|     cmd += " --user=%s --password=%s" %(user, password) | ||||
|     if socket is not None: | ||||
|         cmd += " --socket=%s" % socket | ||||
|     else: | ||||
|         cmd += " --host=%s" % host | ||||
|     cmd += " %s" % db_name | ||||
|     cmd += " -D %s" % db_name | ||||
|     cmd += " < %s" % target | ||||
|     rc, stdout, stderr = module.run_command(cmd) | ||||
|     return rc, stdout, stderr | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue