Resolved Mysql Problem

Installation Problems Support
User avatar
Luxurious
Senior Member
Senior Member
Egypt
Posts: 144
Joined: 1 Year Ago
Location: Egypt
Has thanked: 3 times
Been thanked: 4 times
Contact:

Mysql Problem

#1

Post by Luxurious » 2 Weeks Ago

Hello Guys , I have some problem when i make the level/Coins Save by Mysql that what i got

Code: Select all

L 08/05/2019 - 21:05:42: [AMXX] Plugin says: Failed to connect to MySQL database: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
DragonsXtreme Zombie-Escape V1.4
IP : 81.2.247.149:27015

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1961
Joined: 2 Years Ago
Location: Egypt
Has thanked: 32 times
Been thanked: 108 times
Age: 21
Contact:

#2

Post by Raheem » 2 Weeks Ago

This because remote connection not enabled i think (Not sure), the database installed on same machine you host your server on?
You don't know? Learn and you will know.

User avatar
Luxurious
Senior Member
Senior Member
Egypt
Posts: 144
Joined: 1 Year Ago
Location: Egypt
Has thanked: 3 times
Been thanked: 4 times
Contact:

#3

Post by Luxurious » 2 Weeks Ago

i using linux and i using the Open Game Panel and the Mysql is Showing me is Online !
DragonsXtreme Zombie-Escape V1.4
IP : 81.2.247.149:27015

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1961
Joined: 2 Years Ago
Location: Egypt
Has thanked: 32 times
Been thanked: 108 times
Age: 21
Contact:

#4

Post by Raheem » 2 Weeks Ago

Open game panel does not use MySQL.

Give more information, where MySQL installed? And where your server installed? They are on same machine?

If so, then make sure that MySQL running and also make sure that user/pass/database exists and also right permissions given for the user that will access the database.
You don't know? Learn and you will know.

User avatar
Luxurious
Senior Member
Senior Member
Egypt
Posts: 144
Joined: 1 Year Ago
Location: Egypt
Has thanked: 3 times
Been thanked: 4 times
Contact:

#5

Post by Luxurious » 2 Weeks Ago

The Mysql and server in the one vps !
the Msql is showing in Msql Administrator " MySQL server name: root Server status: Online / MySQL online"
i don`t know about the access !
DragonsXtreme Zombie-Escape V1.4
IP : 81.2.247.149:27015

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1961
Joined: 2 Years Ago
Location: Egypt
Has thanked: 32 times
Been thanked: 108 times
Age: 21
Contact:

#6

Post by Raheem » 2 Weeks Ago

OK, open putty and login then run these respectively:
    1. mysql -u root -p
    2. CREATE DATABASE coinsdb;
    3. CREATE USER 'coinsadmin'@localhost IDENTIFIED BY 'Gt3F35663';
    4. use coinsdb;
    5. GRANT ALL PRIVILEGES ON coinsdb.* TO 'coinsadmin'@localhost;
    6. GRANT ALL ON *.* to coinsadmin@'127.0.0.1' IDENTIFIED BY 'Gt3F35663';
    7. exit
This assumed to make database with name coinsdb and create user to access it which is coinsadmin with password Gt3F356 and also this user have all privileges.

Just now restart MySQL, sudo service mysql restart assuming Ubuntu.

Now you can use:
    1. ze_ec_host "127.0.0.1"          // Database ip
    2. ze_ec_user "coinsadmin"         // Database account username
    3. ze_ec_pass "Gt3F356@63"         // Database account password
    4. ze_ec_dbname "coinsdb"          // Database name

VERY IMPORTANT: MAKE SURE TO USE '127.0.0.1' NOT 'localhost' - AMXMODX is stupid enough and can't resolve the DNS in most cases.
You don't know? Learn and you will know.

User avatar
Luxurious
Senior Member
Senior Member
Egypt
Posts: 144
Joined: 1 Year Ago
Location: Egypt
Has thanked: 3 times
Been thanked: 4 times
Contact:

#7

Post by Luxurious » 2 Weeks Ago

Raheem wrote:
2 Weeks Ago
OK, open putty and login then run these respectively:
    1. mysql -u root -p
    2. CREATE DATABASE coinsdb;
    3. CREATE USER 'coinsadmin'@localhost IDENTIFIED BY 'Gt3F356@63';
    4. use coinsdb;
    5. GRANT ALL PRIVILEGES ON coinsdb.* TO 'coinsadmin'@localhost;
    6. exit
This assumed to make database with name coinsdb and create user to access it which is coinsadmin with password Gt3F356 and also this user have all privileges.

Just now restart MySQL, sudo service mysql restart assuming Ubuntu.

Now you can use:
    1. ze_ec_host "127.0.0.1"          // Database ip
    2. ze_ec_user "coinsadmin"         // Database account username
    3. ze_ec_pass "Gt3F356@63"         // Database account password
    4. ze_ec_dbname "coinsdb"          // Database name

VERY IMPORTANT: MAKE SURE TO USE '127.0.0.1' NOT 'localhost' - AMXMODX is stupid enough and can't resolve the DNS in most cases.

Code: Select all

L 08/05/2019 - 23:00:46: [AMXX] Plugin says: Failed to connect to MySQL database: Access denied for user 'coinsadmin'@'localhost' to database 'coinsdb'
i did but i got this problem !
DragonsXtreme Zombie-Escape V1.4
IP : 81.2.247.149:27015

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1961
Joined: 2 Years Ago
Location: Egypt
Has thanked: 32 times
Been thanked: 108 times
Age: 21
Contact:

#8

Post by Raheem » 2 Weeks Ago

This means that password not right, or this user have no permissions.

Password length should be < 30 characters.

Try change the password for the user and try again. Try password like 12345678
You don't know? Learn and you will know.

User avatar
Luxurious
Senior Member
Senior Member
Egypt
Posts: 144
Joined: 1 Year Ago
Location: Egypt
Has thanked: 3 times
Been thanked: 4 times
Contact:

#9

Post by Luxurious » 2 Weeks Ago

Raheem wrote:
2 Weeks Ago
This means that password not right, or this user have no permissions.

Password length should be < 30 characters.

Try change the password for the user and try again.
i have used the mySQL of the ogp and it worked fine !
Thx For Try to help me !
DragonsXtreme Zombie-Escape V1.4
IP : 81.2.247.149:27015

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1961
Joined: 2 Years Ago
Location: Egypt
Has thanked: 32 times
Been thanked: 108 times
Age: 21
Contact:

#10

Post by Raheem » 2 Weeks Ago

No problem, but why OGP uses database?
You don't know? Learn and you will know.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests