brouznouf / fivem-mysql-async

MySql Async Library for FiveM
MIT License
111 stars 106 forks source link

[ script:mysql-async] [MySQL] [ERROR] [esx_vehicleshop] An error happens for query "SELECT * FROM `vehicles` : []": ER_BAD_DB_ERROR: Unknown database 'fivem' #175

Open josevloxx1 opened 3 years ago

josevloxx1 commented 3 years ago

If anyone got this problem fix Reply back please!.

Nophobia09 commented 3 years ago

What does the connection string look like in your server.cfg? This looks like its pulling the default login which is host: '127.0.0.1', user: 'root', password: '', database: 'fivem'.

If this is the issue then to correct it, fix the connection string to this format set mysql_connection_string "server=YOURDBSERVER;database=YOURDATABASENAME;userid=USERNAME;password=PASSWORD" Replace the all caps with your information. Hope this helps.

josevloxx1 commented 3 years ago

What does the connection string look like in your server.cfg? This looks like its pulling the default login which is host: '127.0.0.1', user: 'root', password: '', database: 'fivem'.

If this is the issue then to correct it, fix the connection string to this format set mysql_connection_string "server=YOURDBSERVER;database=YOURDATABASENAME;userid=USERNAME;password=PASSWORD" Replace the all caps with your information. Hope this helps.

mines's is a local host and how can i create a date base with es_extended it only show me this Captura de pantalla (1464)

Nophobia09 commented 3 years ago

Looks like you have created a database named essentialmode with tables addon_account, addon_account_data, addon_inventory, addon_inventory_items, billing, and users. You need to setup your connection to this database, even if it's local host. @josevloxx1

josevloxx1 commented 3 years ago

Looks like you have created a database named essentialmode with tables addon_account, addon_account_data, addon_inventory, addon_inventory_items, billing, and users. You need to setup your connection to this database, even if it's local host. @josevloxx1

the one you told me to put on server.cfg can you make it local host please to i can put it because local host i don't have password sorry im new too all this i'm learning

josevloxx1 commented 3 years ago

Looks like you have created a database named essentialmode with tables addon_account, addon_account_data, addon_inventory, addon_inventory_items, billing, and users. You need to setup your connection to this database, even if it's local host. @josevloxx1

does this have to be all caps where it say yourname

set mysql_connection_string "server=YOURDBSERVER;database=YOURDATABASENAME;userid=USERNAME;password=PASSWORD"

josevloxx1 commented 3 years ago

Looks like you have created a database named essentialmode with tables addon_account, addon_account_data, addon_inventory, addon_inventory_items, billing, and users. You need to setup your connection to this database, even if it's local host. @josevloxx1

Captura de pantalla (1466)

Nophobia09 commented 3 years ago

Looks like you have created a database named essentialmode with tables addon_account, addon_account_data, addon_inventory, addon_inventory_items, billing, and users. You need to setup your connection to this database, even if it's local host. @josevloxx1

Captura de pantalla (1466)

set mysql_connection_string "server=127.0.0.1;database=essentialmode;userid=root;password=" Should be something close to this. Change what you need to, such as password if you have one set.

josevloxx1 commented 3 years ago

Looks like you have created a database named essentialmode with tables addon_account, addon_account_data, addon_inventory, addon_inventory_items, billing, and users. You need to setup your connection to this database, even if it's local host. @josevloxx1

Captura de pantalla (1466)

set mysql_connection_string "server=127.0.0.1;database=essentialmode;userid=root;password=" Should be something close to this. Change what you need to, such as password if you have one set.

i haven't put password yet do i have to

josevloxx1 commented 3 years ago

set mysql_connection_string "server=127.0.0.1;database=essentialmode;userid=root;password="

why it say this bro all jobs item inventories are in idk Captura de pantalla (1468)

josevloxx1 commented 3 years ago

Looks like you have created a database named essentialmode with tables addon_account, addon_account_data, addon_inventory, addon_inventory_items, billing, and users. You need to setup your connection to this database, even if it's local host. @josevloxx1

Captura de pantalla (1466)

set mysql_connection_string "server=127.0.0.1;database=essentialmode;userid=root;password=" Should be something close to this. Change what you need to, such as password if you have one set.

it doesn't not let me conect to my server give me alot of errors bro

Nophobia09 commented 3 years ago

Still looks like it's trying to connect to serverdurango2.0 also when your server starts it should not be creating the database or adding columns or tables, which it looks like your is. If you can send me a link to your server folder I can set it up for you. Send me your email address and I'll email you.


From: josevloxx1 @.> Sent: Thursday, June 17, 2021 10:42:44 PM To: brouznouf/fivem-mysql-async @.> Cc: Nophobia09 @.>; Comment @.> Subject: Re: [brouznouf/fivem-mysql-async] [ script:mysql-async] [MySQL] [ERROR] [esx_vehicleshop] An error happens for query "SELECT * FROM vehicles : []": ER_BAD_DB_ERROR: Unknown database 'fivem' (#175)

Looks like you have created a database named essentialmode with tables addon_account, addon_account_data, addon_inventory, addon_inventory_items, billing, and users. You need to setup your connection to this database, even if it's local host. @josevloxx1https://github.com/josevloxx1

[Captura de pantalla (1466)]https://user-images.githubusercontent.com/85920394/122338269-1a6bf180-cf05-11eb-8a1a-c112a9a2ca82.png

set mysql_connection_string "server=127.0.0.1;database=essentialmode;userid=root;password=" Should be something close to this. Change what you need to, such as password if you have one set.

it doesn't not let me conect to my server give me alot of errors bro

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/brouznouf/fivem-mysql-async/issues/175#issuecomment-863712240, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARDHD6E6L2ELDYBUR5WJ5IDTTKXCJANCNFSM46YQHEEA.

debugferro commented 3 years ago

@sopergoras123 @Nophobia09 I'm facing the same issue. But I have configured everything just like that.

Inside my config file:

set mysql_connection_string "server=localhost;user=fivem;database=es_extended;password=mypass"

I do have this user "fivem" with the password "mypass" in`my localhost MySQL db. And I conceded full perm to the this user. I also tried:

set mysql_connection_string "mysql://fivem:mypass@localhost/es_extended?waitForConnections=true&charset=utf8mb4
set mysql_connection_string "mysql://fivem:mypass@127.0.0.1/es_extended?waitForConnections=true&charset=utf8mb4
set mysql_connection_string "host=localhost;user=fivem;database=es_extended;password=mypass"
## etc...

Using HeidiSQL, I ran the file es_extended.sql with this user, and created some tables. But it stills complains when I run the server:

[  script:mysql-async] [MySQL] [ERROR] [esx_vehicleshop] An error happens for query "SELECT * FROM `vehicle_categories` : []": ER_ACCESS_DENIED_ERROR: Access denied for user 'fivem'@'localhost' (using password: YES)

Do I have to run other .SQL files? If I do, then what is the order? Because I tried to run some, and many of them complain that another table doesn't exist, so I have to run other SQL files because they depend on the existence of another table. All of this is not very friendly to new developers, because I couldn't find updated documentation about it. My version is the legacy one (https://github.com/esx-framework/esx-legacy)

I will be very happy if one of you could point me in the right direction regarding this.

Thank you.

sarmad-gaming commented 3 years ago

https://cdn.discordapp.com/attachments/748504801540571137/883135480928043068/Untitled.png I have this problem any help?

sarmad-gaming commented 3 years ago

Untitled

boermansjo commented 3 years ago

There is nothing wrong with your server @colector-user Stored queries are amazing and normal :)

Nynag commented 2 years ago

im having the same exact problem, im the only one that can enter the server the other people it says awaiting scripts then my remote control starts to pop out all this mysql things, how do i fix it if someone can add inbox me with the help. image

Nynag commented 2 years ago

tnx

El mar, 7 de dic. de 2021 a la(s) 11:34, Konstantinos Gkoras ( @.***) escribió:

im having the same exact problem, im the only one that can enter the server the other people it says awaiting scripts then my remote control starts to pop out all this mysql things, how do i fix it if someone can add inbox me with the help. [image: image] https://user-images.githubusercontent.com/94886994/142974737-5cf9bd6f-5c17-4256-903c-0ebb6b56d49e.png

When this error appears it means the re is sometihng wrong with the backend of the database. Restart the server. If the problem persists re-do the whole database from the beginning as I do when something like this happens, or before that check if the database can handle the load of the server.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/brouznouf/fivem-mysql-async/issues/175#issuecomment-988087717, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWT5YUXRX2APT7MTDCTN4VTUPYZQFANCNFSM46YQHEEA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.