Jump to content

[Help]in SQL script!


nasserdfdd

Recommended Posts

hi all this is my first post so i wish i get helped

i have sql script but i get this error

error sql\sql.lua:5: dbconnect failed; can't connect to mysql server on 'localhost' (10061)

this is the line 5

    db = dbConnect( "mysql", "dbname="..tostring(get("DATABASE_NAME"))..";localhost=127.0.0.1"..tostring(get("MYSQL_HOST"))..";port="..tostring(get("MYSQL_PORT"))..";unix_socket=/opt/lampp/var/mysql/mysql.sock", tostring(get("MYSQL_USER")), tostring(get("MYSQL_PASS")), "share=1;autoreconnect=1" ); 

btw my server is right now localhost and not online only local cuz iam making it :mrgreen::mrgreen::mrgreen:

i wish i remove this error as fast as possible

Link to comment

i have changed it to this

db = dbConnect( "mysql", "dbname="..tostring(get("DATABASE_NAME"))..";host=127.0.0.1"..tostring(get("MYSQL_HOST"))..";port="..tostring(get("MYSQL_PORT"))..";unix_socket=/opt/lampp/var/mysql/mysql.sock", tostring(get("MYSQL_USER")), tostring(get("MYSQL_PASS")), "share=1;autoreconnect=1" ); 

and now it is showing me this error

sql/sql.lua:5: dbConnect failed; unknown mysql host '127.0.0.1localhost'

Link to comment

hi i have another error :fadein:

db = dbConnect( "mysql", "dbname=".. tostring(get("DATABASE_NAME"))";host=127.0.0.1", port="".. tostring(get("MYSQL_PORT"))"",unix_socket="/opt/lampp/var/mysql/mysql.sock", "".. tostring(get("MYSQL_USER"))"", "".. tostring(get("MYSQL_PASS")) .." ", "share=1;autoreconnect=1" ) 

the error is sql\sql.lua:5: '>' expected near '='

second is sql\sql.lua:5: '>' expected near '='

Link to comment
db = dbConnect("msql", "dbname=" ..tostring(get("DATABASE_NAME"))"127.0.0.1", "port =" .. tostring(get("MYSQL_PORT"))""; unix_socket=/opt/lampp/var/mysql/mysql.sock, ..tostring(get("MSQL_USER"))"", ..tostring(get("MYSQL_PASS")).." "," share=1;autoreconnect=1") 

Link to comment
db = dbConnect("msql", "dbname=" ..tostring(get("DATABASE_NAME"))"127.0.0.1", "port =" .. tostring(get("MYSQL_PORT"))""; unix_socket=/opt/lampp/var/mysql/mysql.sock, ..tostring(get("MSQL_USER"))"", ..tostring(get("MYSQL_PASS")).." "," share=1;autoreconnect=1") 

they give me this error

sql\sql.lua:5: '>' expected near ';'

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...