Commit ff422702 authored by Neranga K.T.'s avatar Neranga K.T.

db connection changed

parent 3570f4b4
......@@ -60,13 +60,14 @@ def get_level():
results=[{"level":float(result)}]
return (jsonify(results=results))
userpass = 'mysql://root:''@'
basedir = '127.0.0.1'
dbname = '/helply'
socket = '?unix_socket=/opt/lampp/var/mysql/mysql.sock'
dbname = dbname + socket
app.config['SQLALCHEMY_DATABASE_URI'] = userpass + basedir + dbname
# userpass = 'mysql://root:''@'
# basedir = '127.0.0.1'
# dbname = '/helply'
# socket = '?unix_socket=/opt/lampp/var/mysql/mysql.sock'
# dbname = dbname + socket
# app.config['SQLALCHEMY_DATABASE_URI'] = userpass + basedir + dbname
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://sql5488870:UylH12yrME@sql5.freesqldatabase.com/sql5488870'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
#DB Connection
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment