Projects
Kolab:16:Testing:Candidate
pykolab-python3
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 4
View file
pykolab-0.9.0.tar.gz/pykolab/setup/setup_mysql.py
Changed
@@ -181,54 +181,35 @@ confirm=True ) - p1 = subprocess.Popen( - - 'echo', - 'UPDATE mysql.user SET Password=PASSWORD(\'%s\') WHERE User=\'root\';' % ( - mysql_root_password - ) - , - stdout=subprocess.PIPE - ) - - p2 = subprocess.Popen('mysql', stdin=p1.stdout) - p1.stdout.close() - p2.communicate() - - p1 = subprocess.Popen( - - 'echo', - "UPDATE mysql.user SET authentication_string=PASSWORD('%s') WHERE User='root';" % ( - mysql_root_password - ) - , - stdout=subprocess.PIPE - ) - - p2 = subprocess.Popen('mysql', stdin=p1.stdout) - p1.stdout.close() - p2.communicate() - - p1 = subprocess.Popen( - - 'echo', - """ - UPDATE mysql.user - SET plugin='mysql_native_password' - WHERE User='root' AND plugin='auth_socket'; - """ - , - stdout=subprocess.PIPE - ) + mysql_commands = + "UPDATE mysql.user SET Password=PASSWORD('%s') WHERE User='root';" % ( + mysql_root_password + ), + "UPDATE mysql.user SET authentication_string=PASSWORD('%s') WHERE User='root';" % ( + mysql_root_password + ), + """ + UPDATE mysql.user + SET plugin='mysql_native_password' + WHERE User='root' AND plugin='auth_socket'; + """, + "SET PASSWORD FOR 'root'@localhost = PASSWORD('%s');" % (mysql_root_password), + "FLUSH PRIVILEGES;" + + + for mysql_command in mysql_commands: + p1 = subprocess.Popen( + + 'echo', + mysql_command + , + stdout=subprocess.PIPE + ) - p2 = subprocess.Popen('mysql', stdin=p1.stdout) - p1.stdout.close() - p2.communicate() + p2 = subprocess.Popen('mysql', stdin=p1.stdout) + p1.stdout.close() + p2.communicate() - p1 = subprocess.Popen('echo', 'FLUSH PRIVILEGES;', stdout=subprocess.PIPE) - p2 = subprocess.Popen('mysql', stdin=p1.stdout) - p1.stdout.close() - p2.communicate() socket_path = None socket_paths =
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.