Skip to content

Commit 3da0329

Browse files
Source Code for the program created
The source code for this program is to check whether your python program is able to establish connection with MySQL version. Note: This source code doesn't come with error handling. For source code with error handling kindly check the other program in the repository
1 parent c80129e commit 3da0329

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import mysql.connector as a
2+
x = a.connect(host='localhost', user='root', password='admin.123')
3+
if x.is_connected():
4+
db_info = x.get_server_info()
5+
print('Connection to MySQL', db_info, 'established!')

0 commit comments

Comments
 (0)