I get this error. The connection details in the wp-config file are correct. I have only been getting this error ever since I sent the website files to my boss to put the website online. I also did a dump of the database to send to him.
Is it at all possible that something he did effected my local copy of the wordpress website? It doesn't seem so...but I have only had this issue since he put it online. Maybe did I remove my database by mistake when I did the dump? Can I check that somehow?
Does a database dump mess up my database? I was the one that did the database dump, to send to him. Did it move my database?
Can I reinstall wordpress as a solution and copy my website into it?
Cheers.
Check if your live server database credentials match with details in your wp-config.
your localohost credential might be different from server credential
Secondly check if your boss has restored dump database
Related
I just uploaded my database onto a remote server, however I am having a database connection error. As all configurations were fine, I contacted my host and they said the connection is fine however I have a lot of key duplication error. Is there any way I can fix this?
Wipe the database and re-import the sql file. Depending on the host, they may have had a wp_ database already uploaded so when you're uploading your database there are duplicate entries. Or, if your db failed to upload once and you tried it again, there could be some overlap there as well.
This is the answer
I am very new to cms and I am wondering if you fine gentleman can help me get started properly. Just a note, I have spent hours researching my questions and I could not find the answer I was looking for.
I have installed silverstripe locally and i started creating my own site with it. Created a new theme, deleted the old 2. It created some random database for me, it was mostly automated. Now I have a server, and I want to put it on my server, but I can't figure out for the life of me how to import it. I was able to install silverstripe and have a default theme (simple) running, but no matter what file I copy or change, it never loads my site. Does anyone has a tutorial on how this is achieved? server is with godaddy.
When I started creating this site, it created a database with a random name, how can I rename that database? What are the files I need to update?
How do I access phpmyadmin locally? localhost:port/phpmyadmin does not works.
1. Site deployment
Here is how I deploy a Silverstripe website to a live server.
ftp into the server
Upload all the files from the development folder to the server
Create a database on the server
Create a database user for the database and add all database privileges
Update the live mysite/_config.php file with your live database username, password and database name
Dump your local database
Import your database dump into your live server database
Call dev/build/?flush=all on your live server
Check the website works
Have a beer
2. Database renaming
The database settings are stored in mysite/_config.php. They should look something like this:
$databaseConfig = array(
'type' => 'MySQLDatabase',
'server' => 'localhost',
'username' => 'database_username',
'password' => 'database_password',
'database' => 'database_name'
);
To rename the database, rename your database in phpmyadmin. Then update your $databaseConfig database name in your mysite/_config.php file.
3. localhost phpmyadmin
Webmatrix does not come with phpmyadmin. You can download it, extract it to your webmatrix html root directory and use it. Or you can download an alternative like adminer, which is a one file database manager.
With regards to renaming your database, see the comments above as they are accurate.
However you still seem to be having problems getting your database out of your local environment, so let's concentrate on that first and see how you go with it.
Note that there are at least two ways you can back up/export your local database:
1). Using phpMyAdmin (Or other web-based DB utility)
2). Using the command line (see the 'mysqldump' command)
You asked about using phpMyAdmin to backup your SilverStripe database so I'll address only 1). above:
As this is specfic to your own development environment and you've not mentioned how far you've got in setting this up locally, nor any error messages you may have received, myself and others can only go so far in helping you out with this.
If you've setup phpMyAdmin as per the installation requirements, it should be installed by default and accessible at this address on your computer:
http://localhost:80/phpmyadmin
The following will also work, as port 80 is the default for most webservers:
http://localhost/phpmyadmin
If neither of these work and you receive a 404, 403 or 500 error (The screen in the browser should tell you which of these has occurred) I'm pretty confident you've not set it up correctly on your system. My suggestion is therefore to go back to the phpMyAdmin docs and re-check you've performed everything correctly as per your own environment setup (e.g. for Linux, OS X, Windows etc).
Once you're setup correctly, have a crack at the DB renaming suggestions above and coe back for more help if you need it.
I have a problem with Cpanel, or atleast with my database, because i cant see my database trough either cpanel,mysql databases or phpmyadmin but when i tried to run a import sql script it states that the database exists. How can i access my database, i have heard some databasemapping resets on cpanel level but the problem is that i cant access the server on any way(only my site via FTP ofcourse).
It looks like i dont have permission, also my firstly created (head mysql account) is gone, or atleast i cant login with the same credentials as before. Whenever i try to add an mysql user it says completed(user created succesfully) but when looking at all users there aren't any users stated.
Sounds strange doesn't it?
I hope someone knows the answer, i need the database back.
You can use Adminer for importing and exporting data via ftp. Please try.
I creaed one dnn applicaiton, and the source is moved to production and also same as the database is also moved to production server, but i am getting the dotnetnuke error. I think there is a database not inserted correctly.
Can you help me how to transfer the database from local to production..
I would double check that your local and production site web.config have the same machine key and decription key all match
Other thing to check would be that the connection string is correct
One more thing would be to check permissions on the database
Use SQL Delta
After I uploaded my application created using cakephp, I found out that I had to rename the database. I renamed my database accordingly and changed the settings in the database.php file in the "config" folder. But my application is still not running.
I am being shown this error message
"Missing Database table"
"Error: Database table tbl_topics for model Topic was not found."
I have double checked the existence of tbl_topics in the database (it is there in the database) but the application says "table not found"
what might be the problem, please help me out...
Make sure the host/user/pass that you've set-up in the config.php file have access to that database and table
You could also try running cake schema generate --dry which will spit back any problems with the connection that you might be having
Also have a look in your app/tmp/logs for some extra information on the problems you are experiencing
Take the username and password you are using for cakephp and it's db connection and connect to the database from the command line. I'm presuming you are using a unix-type system and mysql?
mysql --user=user_name --password=your_password db_name
...and then try to run a simple select:
SELECT * FROM tbl_topics
If you get an error there, it will at least identify that it is a low level db problem and the likely solution is that you need to grant permissions to that username to select from that database. Your current access levels for that user is probably granting access to the db under the old name.
You have probably uploaded your cache files as well. Make sure you delete all the files in /app/tmp/cache/*
Warning: Don't delete the folders, files only!
Also, make sure your tmp folder and all the subfolders are world-writable.
One last thought would be to check your model cache. I don't know why that would impact you with respect to connecting, but it's worth taking a look in app/tmp/cache.
:-)
finally got it.... :-D
I forgot to assign the user access to my application's database on main server. After assigning the permissions all went fine.
Anyways thank you all for your valuable answers... It helped me gain some additional knowledge about cakephp.