Lines Matching +full:server +full:- +full:password
3 # Use of this source code is governed by a BSD-style license that can be
8 The purpose of this module is to grant access to a new-user/host/password
9 combination on a remote db server. For example, if we were bootstrapping
10 a new autotest main A1 with a remote database server A2, the scheduler
14 A1_pass, A1_host). If OTOH the db server is running locally we only need
19 Execute mysql -u <default_user> -p<default_pass> -e
25 In the case of a vagrant cluster, a remote vm cannot ssh into the db server
28 database server without knowing their ips by using the ip of the gateway.
29 This works because the db server vm redirects its database port (3306) to
35 Provision the vagrant db server
36 Execute mysql -u <default_user> -p<default_pass> -e
78 def mysql_cmd(cls, cmd, user=DEFAULT_USER, password=DEFAULT_PASS, argument
82 @param cmd: The mysql command to wrap with the --execute option.
85 @param password: The password for the user.
86 @param port: The port mysql server is listening on.
88 return ('mysql -u %s -p%s --host %s --port %s -e "%s"' %
89 (user, password, host, port, cmd))
94 """Execute a mysql statement on a remote server by sshing into it.
96 @param dest_server: The hostname of the remote mysql server.
109 def ping(cls, db_server, user=DEFAULT_USER, password=DEFAULT_PASS, argument
111 """Ping the given db server as 'user' using 'password'.
113 @param db_server: The host running the mysql server.
115 @param password: The password of the user.
117 by supplying --host=db_server in the mysql command. Otherwise we
119 --host=localhost.
131 password=password)
135 def bootstrap(user, password, source_host, dest_host): argument
138 Allow a user from source_host to access the db server running on
142 @param password: The password for the user.
144 @param dest_host: The hostname of the remote db server.
146 @raises MySQLCommandError: If we can't ping the db server using the default
147 user/password specified in the shadow_config under default_db_*, or
155 "it using fab -H <hostname> bootstrap from the "
156 "chromeos-admin repo.")
167 'new_pass': password,
171 # databases which may/may-not exist on various roles that need refactoring.
178 # Confirm the new user can ping the remote database server from localhost.
180 dest_host, user=user, password=password, use_ssh=False)
189 cmd = 'netstat -rn | grep "^0.0.0.0 " | cut -d " " -f10 | head -1'
201 '--enable_gateway', action='store_true', dest='enable_gateway',
210 access through the gateway if --enable_gateway is specified.
217 password = global_config.global_config.get_config_value(
218 'AUTOTEST_WEB', 'password')
225 logging.info('Bootstrapping user %s on host %s against db server %s',
227 bootstrap(user, password, local_hostname, dest_host)
232 bootstrap(user, password, gateway, dest_host)