[MySql] Errors in server log HELP
#1

Okay, so recently I got a .sql file from a friend and he had it running on his own volt host database, worked fine, I plugged it into the mysql.cfg with his details and it worked all fine... I made a export of the same database on his volt and put it on my XAMPP mysql... I made a new database imported the .sql and the tables look exactly like his, however when I run the samp-server.exe I get something like this...

Код HTML:
[09:36:49] SELECT * FROM `houses`
[09:36:49] [MySQL] Query Error - (ErrorID: 1046) (Handle: 1)
[09:36:49] [MySQL] Check /logs/querydump.log to review the query that threw the error.
[09:36:49] Dumping query from 2013/6/27 (9:36:49)

Description: No database selected (index 0). Query:
Here is my mysql.cfg (Note, I do not have a XAMPP password set)

Код HTML:
HOST=localhost
DB=script
USER=root
PASS=
Whoever can help me fix this will get + rep
Reply
#2

1. Either there is no table or row of `Houses` and show the query dump.
Reply
#3

The error #1046 means

Код:
#1046 - No database selected
mysql_connect params are something like this:

mysql_connect(host, user, DATABASE, pass)

Make sure you inserted a valid database.

You can try to run this query:

"USE database_name"

to select the database to use (check the mysql_connect line before try this, this should be automatic!)



Oh:

script database is valid? Is created?
Reply
#4

Yes, I mean.. It all worked completly fine in my friends volt mysql... It is done exactly as it was in his sql.. But it wont work.
Reply
#5

Quote:
Originally Posted by Nick_Phelps
Посмотреть сообщение
Yes, I mean.. It all worked completly fine in my friends volt mysql... It is done exactly as it was in his sql.. But it wont work.
You need to show us your error log for the direct error.
Reply
#6

Where is the error log?
Reply
#7

Quote:
Originally Posted by Nick_Phelps
Посмотреть сообщение
Where is the error log?
It gave you the error inside the console look there.
Reply
#8

Код HTML:
[09:36:49]  ======================================= 
[09:36:49]  |                                     | 
[09:36:49]  |   Error: Could not connect to YSI   | 
[09:36:49]  |  update server (response was 001).  | 
[09:36:49]  |                                     | 
[09:36:49]  ======================================= 
[09:36:49]  
[09:36:49] [MySQL] Query Error - (ErrorID: 1046) (Handle: 1)
[09:36:49] [MySQL] Check /logs/querydump.log to review the query that threw the error.
[09:36:49] Dumping query from 2013/6/27 (9:36:49)

Description: No database selected (index 0). Query:


[09:36:49] SELECT `gMOTD`,`aMOTD`,`vMOTD`,`cMOTD`,`pMOTD`,`ShopTechPay` FROM `motd`
[09:36:49] [MySQL] Query Error - (ErrorID: 1046) (Handle: 1)
[09:36:49] [MySQL] Check /logs/querydump.log to review the query that threw the error.
[09:36:49] Dumping query from 2013/6/27 (9:36:49)

Description: No database selected (index 0). Query:


[09:36:49] UPDATE `accounts` SET `Online` = 0 WHERE `Online` = 0
[09:36:49] [MySQL] Query Error - (ErrorID: 1046) (Handle: 1)
[09:36:49] [MySQL] Check /logs/querydump.log to review the query that threw the error.
[09:36:49] Dumping query from 2013/6/27 (9:36:49)

Description: No database selected (index 0). Query:


[09:36:49] SELECT * FROM `houses`
[09:36:49] [MySQL] Query Error - (ErrorID: 1046) (Handle: 1)
[09:36:49] [MySQL] Check /logs/querydump.log to review the query that threw the error.
[09:36:49] Dumping query from 2013/6/27 (9:36:49)

Description: No database selected (index 0). Query:


[09:36:49] SELECT * FROM `businesses`
[09:36:49] [MySQL] Query Error - (ErrorID: 1046) (Handle: 1)
[09:36:49] [MySQL] Check /logs/querydump.log to review the query that threw the error.
[09:36:49] Dumping query from 2013/6/27 (9:36:49)

Description: No database selected (index 0). Query:

[09:37:36] SELECT `Username` FROM `accounts` WHERE `Username` = 'Charles_Greens'
[09:37:52] [part] Charles_Greens has left the server (0:1)
[09:37:56] [MySQL] Query Error - (ErrorID: 1046) (Handle: 1)
[09:37:56] [MySQL] Check /logs/querydump.log to review the query that threw the error.
[09:37:56] Dumping query from 2013/6/27 (9:37:56)

Description: No database selected (index 0). Query:


[09:37:56] UPDATE `letters` SET `Delivery_Min` = `Delivery_Min` - 1 WHERE `Delivery_Min` > 0
[09:37:56] [MySQL] Query Error - (ErrorID: 1046) (Handle: 1)
[09:37:56] [MySQL] Check /logs/querydump.log to review the query that threw the error.
[09:37:56] Dumping query from 2013/6/27 (9:37:56)

Description: No database selected (index 0). Query:
Reply
#9

Database doesn't exist, you've mistyped the database, or your MySQL connection isn't selecting the database properly.

Check if the database exists, check if its properly spelled in your config, and check your connection and see if it selects the database you want
Reply
#10

Could it be because im using "localhost" as my host?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)