SA-MP Forums Archive
sql database error when import - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: sql database error when import (/showthread.php?tid=564539)



sql database error when import - PowerF - 22.02.2015

hey,i already create database via cpanel
and re-write the database name on sql file
but its still error

Код:
Error

SQL query:

--
-- Database: `savserve_ufx`
--
-- --------------------------------------------------------
--
-- Table structure for table `banlog`
--
CREATE TABLE IF NOT EXISTS `banlog` (
`Name` varchar( 24 ) NOT NULL ,
`pBannedReason` varchar( 128 ) NOT NULL ,
`pBannedBy` varchar( 24 ) NOT NULL ,
`pTime` varchar( 255 ) NOT NULL ,
`pIPBanned` varchar( 16 ) NOT NULL ,
`pAccountLock` int( 11 ) NOT NULL
) ENGINE = InnoDB DEFAULT CHARSET = latin1;

MySQL said: Documentation
#1046 - No database selected



Re: sql database error when import - Extremo - 22.02.2015

Are you sure the database exists? It seems to be it doesn't.

You have to tell mysql to use a database and if it doesn't exist you have to create it. Something like:

pawn Код:
CREATE DATABASE database;
USE database;