Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 04-18-2020, 08:33 AM   #1
Smack dat
So Fucking Banned
 
Industry Role:
Join Date: Jul 2016
Posts: 4,613
I need help with an .sql file because I am basically going crazy.

If anyone can help it would be appreciated.

Basically I used to own a wordpress site back in 2013/2014. I ended up letting the domain expire but I still have the backup and .sql file.

Anyway, I thought I would try and get it back up and running on a new domain.

I installed wordpress on the new domain and I have been trying all day to get this stupid .sql file from 2014 to upload.

I am trying to do it through cPanel/ mySQL but each time there is some error or other.

I then need to Google the error and a fix and try and make the change.

I also tried editing the SQL file directly but I am just getting myself confused. So, please if anyone knows how to get this installed help me out. Please.
Smack dat is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-18-2020, 08:42 AM   #2
PornDiscounts-V
Confirmed User
 
PornDiscounts-V's Avatar
 
Industry Role:
Join Date: Oct 2003
Location: L.A.
Posts: 5,740
Perhaps your php install is limited to file uploads that are smaller than the size of your file?
__________________
Blog Posts - Contextual Links - Hardlinks on 600+ Blog Network
* Handwritten * 180 C Class IPs * Permanent! * Many Niches! * Bulk Discounts! GFYPosts /at/ J2Media.net
PornDiscounts-V is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-18-2020, 08:47 AM   #3
Smack dat
So Fucking Banned
 
Industry Role:
Join Date: Jul 2016
Posts: 4,613
Quote:
Originally Posted by PornDiscounts-V View Post
Perhaps your php install is limited to file uploads that are smaller than the size of your file?
No, I don't think it's that. It's about a 35mb file.

I get things like this: ERROR 1231 (42000): Variable ‘time_zone’ can’t be set to the value of ‘NULL’
and
ERROR 1231 (42000): Variable ‘sql_mode’ can’t be set to the value of ‘NULL’
Smack dat is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-18-2020, 08:48 AM   #4
Smack dat
So Fucking Banned
 
Industry Role:
Join Date: Jul 2016
Posts: 4,613
40101 set sql_mode=@old_sql_mode
Smack dat is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-18-2020, 09:01 AM   #5
Smack dat
So Fucking Banned
 
Industry Role:
Join Date: Jul 2016
Posts: 4,613
I have decided to start again. I will post every step and errors. if anyone knows they can jump in.

So just uploaded the old .Sql file and I get the error:
Code:
--
-- Table structure for table `wp_afflctable_link`
--

DROP TABLE IF EXISTS `wp_afflctable_link`
MySQL said: Documentation

#1046 - No database selected
Smack dat is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-18-2020, 09:08 AM   #6
Smack dat
So Fucking Banned
 
Industry Role:
Join Date: Jul 2016
Posts: 4,613
Quote:
Originally Posted by Smack dat View Post
I have decided to start again. I will post every step and errors. if anyone knows they can jump in.

So just uploaded the old .Sql file and I get the error:
Code:
--
-- Table structure for table `wp_afflctable_link`
--

DROP TABLE IF EXISTS `wp_afflctable_link`
MySQL said: Documentation

#1046 - No database selected
Added
Code:
USE database_name;
before the first CREATE TABLE
Smack dat is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-18-2020, 09:20 AM   #7
Smack dat
So Fucking Banned
 
Industry Role:
Join Date: Jul 2016
Posts: 4,613
For some reason this time I have a success message: Import has been successfully finished, 493 queries executed.

However, I can't see the posts.
Smack dat is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-18-2020, 09:27 AM   #8
digitalfantasies
Confirmed User
 
digitalfantasies's Avatar
 
Industry Role:
Join Date: Sep 2010
Location: Caribbean
Posts: 2,636
Did you install WordPress first and then tried to import the sql in existing database?

It's better to create database first and then upload WordPress, it will make necessary databse upgrades.

Also could be that custom posts taxonomy were used if you don't see the posts in your wordpress dashboard
__________________
digitalfantasies is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-18-2020, 09:41 AM   #9
Smack dat
So Fucking Banned
 
Industry Role:
Join Date: Jul 2016
Posts: 4,613
Ok, so in mySQL they were on page 2. I can now see the imported posts however they are not visible on the website frontend or backend.

The SQL database now has two post entries:
1. swxl76ygp2d_posts (the newly created posts)
2. wp_posts (my original old posts..

There are loads of these swxl76ygp2d which I presume replaces the original entries. Can I delete them?
Smack dat is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-18-2020, 09:44 AM   #10
Smack dat
So Fucking Banned
 
Industry Role:
Join Date: Jul 2016
Posts: 4,613
Quote:
Originally Posted by digitalfantasies View Post
Did you install WordPress first and then tried to import the sql in existing database?

It's better to create database first and then upload WordPress, it will make necessary databse upgrades.

Also could be that custom posts taxonomy were used if you don't see the posts in your wordpress dashboard
Yes, I uploaded Wordpress first. It looks like the original install has taken the place of my old DB.

i have the old .sql file. If I delete the wordpress install. How would I get it to use a specific sql file rather than generating it's own?
Smack dat is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-18-2020, 09:46 AM   #11
Smack dat
So Fucking Banned
 
Industry Role:
Join Date: Jul 2016
Posts: 4,613
Quote:
Originally Posted by digitalfantasies View Post
Did you install WordPress first and then tried to import the sql in existing database?

It's better to create database first and then upload WordPress, it will make necessary databse upgrades.

Also could be that custom posts taxonomy were used if you don't see the posts in your wordpress dashboard
I am so out of the loop.

So, create a new database from within Cpanel and then edit the wordpress wp-config file to point to the new DB?

Makes sense.
Smack dat is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-18-2020, 10:05 AM   #12
dichotomy
Confirmed User
 
dichotomy's Avatar
 
Industry Role:
Join Date: Jun 2003
Location: Near Tunguska
Posts: 135
Quote:
Originally Posted by Smack dat View Post
I am so out of the loop.

So, create a new database from within Cpanel and then edit the wordpress wp-config file to point to the new DB?

Makes sense.
I usually go via phpmyadmin with this - there are compatibility options for older MySQL imports and some other options that might help and ye, after it's done, you also need a user with rights to mess that database and then edit existing wp-config.php to match newly imported database and created user credentials. I would go so far to guestimate and get approximate old version of WP installed and once you have your "old site", upgrade it.

Make backups!

Worst case - hire someone to do it for you, plenty people who would do it for a fair price.

Hope it helps!
__________________
#_
https://se.marketing/
dichotomy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-18-2020, 12:39 PM   #13
k0nr4d
Confirmed User
 
k0nr4d's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,194
- SSH into the server, edit my.cnf or server.cnf (mysql config file).
- set the following:
sql_mode=
just like that, no value.
- Restart mysqld
- Run the following command
mysql -u USERNAME -p DATABASENAME < file.sql
it will prompt you for password. Enter the password.
k0nr4d is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-18-2020, 01:50 PM   #14
Smack dat
So Fucking Banned
 
Industry Role:
Join Date: Jul 2016
Posts: 4,613
Quote:
Originally Posted by k0nr4d View Post
- SSH into the server, edit my.cnf or server.cnf (mysql config file).
- set the following:
sql_mode=
just like that, no value.
- Restart mysqld
- Run the following command
mysql -u USERNAME -p DATABASENAME < file.sql
it will prompt you for password. Enter the password.
I don't know how to SSH.
Smack dat is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-18-2020, 01:54 PM   #15
Smack dat
So Fucking Banned
 
Industry Role:
Join Date: Jul 2016
Posts: 4,613
Ok, so I thought I would sort it this time.

this is what i did.

Created a new database and user. Added user to database. Saved config details.
Went to FTP and edited the config file.
went back to my domain and it started the install. thought it was going to work but no, it's exactly the same. The files show in mySQL but not front or backend on the website.

Even if I did use a custom posts taxonomy surely the posts/ pages would show in wp-admin?
Smack dat is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-18-2020, 02:40 PM   #16
digitalfantasies
Confirmed User
 
digitalfantasies's Avatar
 
Industry Role:
Join Date: Sep 2010
Location: Caribbean
Posts: 2,636
Are you sure your table prefixes are the same?

Looks like you have prefix wp_afflctable while the standard prefix is wp_

you can change the prefix in your wordpress configuration file in the line

$table_prefix = 'wp_';
__________________
digitalfantasies is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-18-2020, 02:41 PM   #17
digitalfantasies
Confirmed User
 
digitalfantasies's Avatar
 
Industry Role:
Join Date: Sep 2010
Location: Caribbean
Posts: 2,636
nevermind wp_afflctable seems to be a plugin table, still cant hurt to check if table prefixes match
__________________
digitalfantasies is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-18-2020, 02:44 PM   #18
digitalfantasies
Confirmed User
 
digitalfantasies's Avatar
 
Industry Role:
Join Date: Sep 2010
Location: Caribbean
Posts: 2,636
what you can try is some plugins like wp migrate db to import the sql and see if you can retrieve the posts that way
__________________
digitalfantasies is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-19-2020, 02:55 AM   #19
Smack dat
So Fucking Banned
 
Industry Role:
Join Date: Jul 2016
Posts: 4,613
Quote:
Originally Posted by digitalfantasies View Post
Are you sure your table prefixes are the same?

Looks like you have prefix wp_afflctable while the standard prefix is wp_

you can change the prefix in your wordpress configuration file in the line

$table_prefix = 'wp_';
This turned out to be the problem. All sorted now. Many thanks.
Smack dat is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-19-2020, 03:46 AM   #20
dichotomy
Confirmed User
 
dichotomy's Avatar
 
Industry Role:
Join Date: Jun 2003
Location: Near Tunguska
Posts: 135
Ohh, Congrats! Really glad you've got it! Must have been relief! And this makes perfect tutorial for archives.
__________________
#_
https://se.marketing/
dichotomy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-19-2020, 07:40 AM   #21
digitalfantasies
Confirmed User
 
digitalfantasies's Avatar
 
Industry Role:
Join Date: Sep 2010
Location: Caribbean
Posts: 2,636
Quote:
Originally Posted by Smack dat View Post
This turned out to be the problem. All sorted now. Many thanks.
great!
__________________
digitalfantasies is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks

Tags
file, domain, .sql, wordpress, installed, error, basically, time, mysql, confused, directly, change, fix, cpanel, sql, editing, google, running, appreciated, site, 2013/2014, crazy, letting, stupid, day



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.