• Welcome to Simple Machines Community Forum. Please login or sign up.
October 17, 2021, 05:35:39 PM

News:

Want to get involved in developing SMF, then why not lend a hand on our github!


repair_settings.php help

Started by asduskun, March 20, 2011, 01:28:30 PM

Previous topic - Next topic

Illori

if you can not issue a create table command then i dont know what type of server you are hosted on. if you cant create a table you cant really use a database as a database is full of tables that need to be created. at this point without seeing your files and server i am not sure what can be done to help you.

asduskun

ok the answer i got from my hosting is below so what should i do?

You have to create a database using cPanel-->MySQL Databases and then go to cPanel-->phpMyAdmin and use that to import the table structure and data into the new database.

"What errors did you get when you tried?
This has to be an SQL dump, not the physical database.
If the dump included the 'CREATE DATABASE' command, it will not work. You have to make a copy of the dump (always keep a backup if you are editing) and edit out the database creation instructions. "

and the error i got from database import is below


SQL sorgusu:
--
-- Veritabanı: `asduskun`
--
CREATE DATABASE `asduskun` DEFAULT CHARACTER SET latin1 COLLATE latin1_german2_ci;


MySQL çıktısı: 
#1007 - Can't create database 'asduskun'; database exists

and how can i edit it to make it work?

Illori

remove that line starting with create database from your dump file.

asduskun

Shall i attach my database here? Because when i remove that line i get different errors

Illori

please do NOT attach your database here, as it contains information about your users. what errors do you get after removing that line?

MrPhil

Some hosts permit you to create a database using SQL statements, while others require you to use tools such as phpMyAdmin. Ask your host. Are you sure you need to create a database? It sounds like you already have one. You may or may not need to empty it out first.

You need to understand what's in your backup (.sql) file, and what it's trying to do. Then you can look at what you already have and decide what manual actions you need to take before you can import that backup. For example, if the backup does not include any CREATE TABLE commands, you would have to set up the tables first.

asduskun

March 23, 2011, 01:12:04 PM #26 Last Edit: March 23, 2011, 01:25:00 PM by asduskun
i already have a database but i imported it from my first hosting account then i changed two hosting, and when i was using funpic as my host i upgraded to rc5 and then i again moved my hosting to x10hosting and i couldn t import my rc5 databse to my current host so i decided to use my old host, but now as you see http://asduskun.x10.mx there s something missing when i remove CREATE DATABASE `asduskun` DEFAULT CHARACTER SET latin1 COLLATE latin1_german2_ci; line i get this error below

-- Tablo için tablo yapısı `backup_smf_admin_info_files`
--
CREATE TABLE `backup_smf_admin_info_files` (
`id_file` tinyint( 4 ) unsigned NOT NULL AUTO_INCREMENT ,
`filename` varchar( 255 ) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
`path` varchar( 255 ) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
`parameters` varchar( 255 ) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
`data` text COLLATE latin1_german2_ci NOT NULL ,
`filetype` varchar( 255 ) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
PRIMARY KEY ( `id_file` ) ,
KEY `filename` ( `filename` ( 30 ) )
) ENGINE = MYISAM DEFAULT CHARSET = latin1 COLLATE = latin1_german2_ci AUTO_INCREMENT =8;
MySQL çıktısı: Belgeler
#1050 - Table 'backup_smf_admin_info_files' already exists


and i see this error at the bottom of my database

the additional feature working with related tables have been disabled. click here to see why.

And when i click there i see this page

$cfg['Servers'][$i]['pmadb'] ... Not ok [ documents ]
$cfg['Servers'][$i]['relation'] ... Not ok [ documents]
General relation specs: inactive

$cfg['Servers'][$i]['table_info'] ... Not ok [ documents]
show specs: inactive

$cfg['Servers'][$i]['table_coords'] ... Not ok [ documents]
$cfg['Servers'][$i]['pdf_pages'] ... Not ok [ documents]
creating pdf s: inactive

$cfg['Servers'][$i]['column_info'] ... Not ok [ documents]
showing column comments: inactive
SQL query signed: inactive
Browser mappings: inactive

$cfg['Servers'][$i]['history'] ... Not ok [ documents]
SQL history: inactive

$cfg['Servers'][$i]['designer_coords'] ... Not ok [ documents]
designer: Etkisiz

Illori

please do NOT pm anyone to get them to reply to your thread/issue, if and when anyone knows the answer they will reply we are all volunteers around here.

MrPhil

If this is to be a "live" forum, you want to restore to "smf_admin_info_files" (and similarly for other tables). You'll have to change the name in the CREATE TABLE statement (and likely, the INSERT INTO statements too). The error message is quite obvious -- you already created a backup_smf_admin_info_files table at some point, and you're trying to CREATE it again, without first destroying (DROPping) the current copy, or renaming either the existing copy or what the new one will be named.

asduskun

March 24, 2011, 01:32:27 PM #29 Last Edit: March 24, 2011, 02:34:06 PM by asduskun
so ok but how can i do that exactly? can you tell step by step, what do you mean "dropping" how will i do that or what will i rename, i just exported database and wanted to import it, i didn t know this would cause these problems

additionaly after i removed all create table commands i was able to import the database but this time my databse didn t see any tables

asduskun

ok then now i m asking on here i could successfully added 75 tables of my database but i also got this error below what should i do?

when i wanted to import my database into my new host i got this error what should i do?

SQL sorgusu:

--
-- Tablo döküm verisi `backup_smf_openid_assoc`
--
-- --------------------------------------------------------
--
-- Tablo için tablo yapısı `backup_smf_package_servers`
--
CREATE TABLE IF NOT EXISTS `backup_smf_package_servers` (
`id_server` smallint( 5 ) unsigned NOT NULL AUTO_INCREMENT ,
`name` varchar( 255 ) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
`url` varchar( 255 ) COLLATE latin1_german2_ci NOT NULL DEFAULTT '',
PRIMARY KEY ( `id_server` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1 COLLATE = latin1_german2_ci AUTO_INCREMENT =3;

MySQL çıktısı: Belgeler
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'T '',
  PRIMARY KEY (`id_server`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLAT' at line 15

MrPhil

Quote from: asduskun on March 24, 2011, 01:32:27 PM
so ok but how can i do that exactly? can you tell step by step, what do you mean "dropping" how will i do that or what will i rename, i just exported database and wanted to import it, i didn t know this would cause these problems

additionaly after i removed all create table commands i was able to import the database but this time my databse didn t see any tables
You don't touch the .sql file. You go into phpMyAdmin (your database administration tool) and go to each 'backup' table and click on the DROP tab.

If your backup file (.sql) just CREATEs each table without first DROPping the old one, you will need to manually DROP the duplicated tables (in phpMyAdmin) before importing the .sql, which will CREATE new tables.  Note that a database with "backup_" in the table names is useless for SMF -- if you want to use that backup, you either need to edit the .sql file to remove all "backup_" from names (it will then create tables "smf_whatever...", or I think that phpMyAdmin has a function to rename existing tables (since you've obviously already read in the backup once, why do it again?). Anyway, you want to end up with just tables "smf_whatever..." rather than "backup_smf_whatever...".

MrPhil

Quote from: asduskun on March 24, 2011, 04:49:00 PM
`url` varchar( 255 ) COLLATE latin1_german2_ci NOT NULL DEFAULTT '',
I can't figure out what language this is (it doesn't translate as German), but I do see DEFAULT misspelled as DEFAULTT. That is what the error message seems to be complaining about. Change DEFAULTT to DEFAULT.

Advertisement: