def connect(self): """Connect to MySQL database.""" print("Connecting to MySQL, mysql --host %s -u %s -p%s" % (self.host, MYSQL_USERNAME, MYSQL_PASSWORD)) self.client = LocalSqlClient(util.init_engine(MYSQL_USERNAME, MYSQL_PASSWORD, self.host), use_flush=False)
def _root_local_sql(self): engine = init_engine(user, password, instance_info.user_ip) client = LocalSqlClient(engine) with client: t = text("""SELECT User, Host FROM mysql.user WHERE User=:user AND Host=:host;""") result = client.execute(t, user=user, host=host) for row in result: assert_equal(user, row['User']) assert_equal(host, row['Host']) root_password = password self.root_enabled_timestamp = self.dbaas_admin.management.show(instance_info.id).root_enabled_at assert_not_equal(self.root_enabled_timestamp, 'Never')
def _root_local_sql(self): engine = init_engine(user, password, instance_info.user_ip) client = LocalSqlClient(engine) with client: t = text("""SELECT User, Host FROM mysql.user """ """WHERE User="******" AND Host="%s" """ % (user, host)) result = client.query(t) for row in result: assert_equal(user, row["User"]) assert_equal(host, row["Host"]) root_password = password reh = self.dbaas_admin.management.root_enabled_history self.root_enabled_timestamp = reh(instance_info.id).enabled assert_not_equal(self.root_enabled_timestamp, "Never")
def _root_local_sql(self): engine = init_engine(user, password, instance_info.user_ip) client = LocalSqlClient(engine) with client: t = text("""SELECT User, Host FROM mysql.user """ """WHERE User="******" AND Host="%s" """ % (user, host)) result = client.query(t) for row in result: assert_equal(user, row['User']) assert_equal(host, row['Host']) root_password = password reh = self.dbaas_admin.management.root_enabled_history self.root_enabled_timestamp = reh(instance_info.id).enabled assert_not_equal(self.root_enabled_timestamp, 'Never')
def connect(self): """Connect to MySQL database.""" print("Connecting to MySQL, mysql --host %s -u %s -p%s" % (self.host, MYSQL_USERNAME, MYSQL_PASSWORD)) self.client = LocalSqlClient(util.init_engine( MYSQL_USERNAME, MYSQL_PASSWORD, self.host), use_flush=False)
def connect(self): """Connect to MySQL database.""" self.client = LocalSqlClient(util.init_engine( MYSQL_USERNAME, MYSQL_PASSWORD, self.host), use_flush=False)