@@ -28,14 +28,14 @@ These are the clients we actively test against to check are compatible with go-m
2828import pymysql.cursors
2929
3030connection = pymysql.connect(host = ' 127.0.0.1' ,
31- user = ' user ' ,
32- password = ' pass ' ,
33- db = ' db ' ,
31+ user = ' root ' ,
32+ password = ' ' ,
33+ db = ' gitbase ' ,
3434 cursorclass = pymysql.cursors.DictCursor)
3535
3636try :
3737 with connection.cursor() as cursor:
38- sql = " SELECT foo FROM bar "
38+ sql = " SELECT * FROM commit_files LIMIT 1 "
3939 cursor.execute(sql)
4040 rows = cursor.fetchall()
4141
@@ -50,14 +50,14 @@ finally:
5050import mysql.connector
5151
5252connection = mysql.connector.connect(host = ' 127.0.0.1' ,
53- user = ' user ' ,
54- passwd = ' pass ' ,
53+ user = ' root ' ,
54+ passwd = ' ' ,
5555 port = 3306 ,
56- database = ' dbname ' )
56+ database = ' gitbase ' )
5757
5858try :
5959 cursor = connection.cursor()
60- sql = " SELECT foo FROM bar "
60+ sql = " SELECT * FROM commit_files LIMIT 1 "
6161 cursor.execute(sql)
6262 rows = cursor.fetchall()
6363
@@ -72,9 +72,9 @@ finally:
7272import pandas as pd
7373import sqlalchemy
7474
75- engine = sqlalchemy.create_engine(' mysql+pymysql://user:pass @127.0.0.1:3306/dbname ' )
75+ engine = sqlalchemy.create_engine(' mysql+pymysql://root: @127.0.0.1:3306/gitbase ' )
7676with engine.connect() as conn:
77- repo_df = pd.read_sql_table(" mytable " , con = conn)
77+ repo_df = pd.read_sql_table(" commit_files " , con = conn)
7878 for table_name in repo_df.to_dict():
7979 print (table_name)
8080```
@@ -84,8 +84,8 @@ with engine.connect() as conn:
8484``` ruby
8585require " mysql"
8686
87- conn = Mysql ::new (" 127.0.0.1" , " user " , " pass " , " dbname " )
88- resp = conn.query " SELECT foo FROM bar "
87+ conn = Mysql ::new (" 127.0.0.1" , " root " , " " , " gitbase " )
88+ resp = conn.query " SELECT * FROM commit_files LIMIT 1 "
8989
9090# use resp
9191
@@ -96,10 +96,10 @@ conn.close()
9696
9797``` php
9898try {
99- $conn = new PDO("mysql:host=127.0.0.1:3306;dbname=dbname ", "user ", "pass ");
99+ $conn = new PDO("mysql:host=127.0.0.1:3306;dbname=gitbase ", "root ", "");
100100 $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
101101
102- $stmt = $conn->query('SELECT foo FROM bar ');
102+ $stmt = $conn->query('SELECT * FROM commit_files LIMIT 1 ');
103103 $result = $stmt->fetchAll(PDO::FETCH_ASSOC);
104104
105105 // use result
@@ -116,13 +116,13 @@ import mysql from 'mysql';
116116const connection = mysql .createConnection ({
117117 host: ' 127.0.0.1' ,
118118 port: 3306 ,
119- user: ' user ' ,
120- password: ' pass ' ,
121- database: ' dbname '
119+ user: ' root ' ,
120+ password: ' ' ,
121+ database: ' gitbase '
122122});
123123connection .connect ();
124124
125- const query = ' SELECT foo FROM bar ' ;
125+ const query = ' SELECT * FROM commit_files LIMIT 1 ' ;
126126connection .query (query, function (error , results , _ ) {
127127 if (error) throw error;
128128
@@ -144,13 +144,13 @@ namespace something
144144 {
145145 public async Task DoQuery ()
146146 {
147- var connectionString = " server=127.0.0.1;user id=user ;password=pass ;port=3306;database=dbname ;" ;
147+ var connectionString = " server=127.0.0.1;user id=root ;password=;port=3306;database=gitbase ;" ;
148148
149149 using (var conn = new MySqlConnection (connectionString ))
150150 {
151151 await conn .OpenAsync ();
152152
153- var sql = " SELECT foo FROM bar " ;
153+ var sql = " SELECT * FROM commit_files LIMIT 1 " ;
154154
155155 using (var cmd = new MySqlCommand (sql , conn ))
156156 using (var reader = await cmd .ExecuteReaderAsync ())
@@ -172,8 +172,8 @@ import java.sql.*;
172172
173173class Main {
174174 public static void main (String [] args ) {
175- String dbUrl = " jdbc:mariadb://127.0.0.1:3306/dbname ?user=user &password=pass " ;
176- String query = " SELECT foo FROM bar " ;
175+ String dbUrl = " jdbc:mariadb://127.0.0.1:3306/gitbase ?user=root &password=" ;
176+ String query = " SELECT * FROM commit_files LIMIT 1 " ;
177177
178178 try (Connection connection = DriverManager . getConnection(dbUrl)) {
179179 try (PreparedStatement stmt = connection. prepareStatement(query)) {
@@ -202,16 +202,16 @@ import (
202202)
203203
204204func main () {
205- db , err := sql.Open (" mysql" , " user:pass @tcp(127.0.0.1:3306)/test " )
205+ db , err := sql.Open (" mysql" , " root: @tcp(127.0.0.1:3306)/gitbase " )
206206 if err != nil {
207207 // handle error
208208 }
209209
210- rows , err := db.Query (" SELECT foo FROM bar " )
210+ rows , err := db.Query (" SELECT * FROM commit_files LIMIT 1 " )
211211 if err != nil {
212212 // handle error
213213 }
214214
215215 // use rows
216216}
217- ```
217+ ```
0 commit comments