King12 Posted August 3, 2013 Share Posted August 3, 2013 Hello, I have a problem with dbConnect, it says: "dbConnect failed; Could not connect", why ? dbHandler = dbConnect("mysql","dbname=ni157812_1_DB;host=localhost","root","******") help me guys Link to comment
xXMADEXx Posted August 3, 2013 Share Posted August 3, 2013 This is what I use to connect my database: local user = "xXMADEXx" local pass = "" local host = "127.0.0.1" local db = "" db = dbConnect ( "mysql", "host="..host..";dbname="..db , user, pass ) If it dosn't work then its the MySQL host... Link to comment
King12 Posted August 3, 2013 Author Share Posted August 3, 2013 This is what I use to connect my database: local user = "xXMADEXx" local pass = "" local host = "127.0.0.1" local db = "" db = dbConnect ( "mysql", "host="..host..";dbname="..db , user, pass ) If it dosn't work then its the MySQL host... user,pass is about the the phpmyadmin login information ? Link to comment
xXMADEXx Posted August 4, 2013 Share Posted August 4, 2013 This is what I use to connect my database: local user = "xXMADEXx" local pass = "" local host = "127.0.0.1" local db = "" db = dbConnect ( "mysql", "host="..host..";dbname="..db , user, pass ) If it dosn't work then its the MySQL host... user,pass is about the the phpmyadmin login information ? yea. Instead of using "localhost" use "127.0.0.1" Link to comment
King12 Posted August 4, 2013 Author Share Posted August 4, 2013 This is what I use to connect my database: local user = "xXMADEXx" local pass = "" local host = "127.0.0.1" local db = "" db = dbConnect ( "mysql", "host="..host..";dbname="..db , user, pass ) If it dosn't work then its the MySQL host... user,pass is about the the phpmyadmin login information ? yea. Instead of using "localhost" use "127.0.0.1" still won't connect, even with the correct values Link to comment
King12 Posted August 4, 2013 Author Share Posted August 4, 2013 problem fixed. (closed) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now