In my hosting account I have multiple databases for my sites and because I didn't know better at that time I let the install wizard use the default name so now I have 12 databases all with names user_wrdp1 user_wrdp2 ... user_wrdp12.
Now I need to export the db for one of my websites but I don't know how to identify it.
Please someone help me out
You can go to your websites Filemanager or login to the FTP. Find the wp-config.php file, In that file, you will find the database name for that website like this
define('DB_NAME', 'user_wrdp1');
Also you can use phpmyadmin to browse that database. under wp_options table you can see the website url.
*** database prefix can be something other than wp_ in some websites.
Regards
When I download a new wordpress from wordpress.org and then paste it into my www folder of WAMP, then create a new database in phpmyadmin, then go to localhost and click the wordpress site, it asks to create the config file, and enter the database details, and i do that correctly, but when I click submit, it says "Can’t select database".
Any Idea why this is?
I already have a local wordpress site that started saying error connecting to database. The config settings are all correct so i tried to download a fresh wordpress site and use it and I cannot even set up a fresh one. I have never encountered a fresh wordpress site not working like this before.
I did a msqldump of my old site so that my boss could put it on his server. Not sure if that is relevant.
Cheers.
Please don't overcomplicate.
In the "Database Host" field add "localhost: e.g. in my case "localhost:3308" solved the problem.
For anyone who's still looking for solutions to this problem - please, check again your wp-config.php database credentials again. I had the same problem today and tried to over-complicate the matter by searching for advanced solutions, while I had a space in my DB_NAME field (was supposed to be 'wpdb' and was ' wpdb').
This space completely messed up my connection, I was even close to reinstalling the whole thing and losing all data.
If using LAMP -
Make sure that all privileges are granted for that database to the created mysql user. Under your MYSQL shell use the below
GRANT ALL PRIVILEGES ON database_name.* TO database_user#localhost IDENTIFIED BY 'user_password';
Where,
database_name = your database name as per wp-config.php
database_user = your user name as per wp-config.php
userpassword = your user password as per wp-config.php
It sounds like either you have not created a database or your wp-config file is not set up correctly. Have you edited wp-config.php file of wordpress and provided correct database name and user credentials. See Famous 5 minute installation of wordpress for details.
It took me way too long to discover that my msql databases were not working on any other websites either. I reinstalled Wamp Server and it worked.
Verify the wp-config.php file.
I had the same error and the problem was related with the quotes:
‘root’ vs 'root'
edit: the correct one is single quote
'
By default
username : root
password : leave it blank
database host : localhost
table_prefix : wp_
For me, the solution was giving wp_user all permissions on the wp_db database.
I achieved this using the command line interpreter (CLI):
$ mysql -uroot -p
MariaDB [(none)]> GRANT ALL ON `wp_db`.* TO `wp_user`#`localhost` IDENTIFIED BY 'pass';
MariaDB [(none)]> exit;
After these operations, I restarted the database:
$ systemctl restart mysql
Of course, the database name (wp_db), username (wp_user), and password of the user (pass) can be different.
my problem was that when I granted permissions to the DB user the host did not match what was in the wp_config.php
/** MySQL hostname */
define('DB_HOST', 'localhost:3306');
I was granting rights with
GRANT ALL ON databaseName.* TO 'UserName'#'127.0.0.1';
This gave me access when I was connected to the local host through ssh but It did not match wp_config.php. so I had to Grant like this then it all worked.
GRANT ALL ON databaseName.* TO 'UserName'#'localhost';
For Mariadb hostname should be localhost:3306 and for MySQL localhost:3308.this fixed my error.
I had this issue when trying to transfer databases between WAMP server installations.
I tried opening PhpMyAdmin on new PC, then got the port of MySql server (:3308) and added this port into DB_HOST ('localhost:3308'). This worked for me.
please create your database with name 'wordpress' before installing wordpress
You may need to create the database yourself.
Visit http://localhost:8888/phpMyAdmin5
create a new database with the name you prefer.
Don't add any table names, just use the name you choose for the database in the WordPress setup
I would like to ask, if it is possible to get my database from an offline (not functioning) xampp ?
You see, I have backed up my database earlier but I am not sure whether there are all the data I need now and the DB is pretty big (like 50 tables). I wanted to go for a local implementation of apache, mysql and PHP for my web applications. So I have reinstalled mysql and want to use my own local apache server instead of xampp.
I would like to know where can I find some .sql or something that is stored in xampp that could be otherwise accessible via the phpmyadmin? Is it even possible? I have scrolled through the xampp folder and tried to figure out where it can be, but didnt find anything though.
Thanks for help.
EDIT
I am on a mac running mavericks.
First go to localhost/phpmyadmin and create a database as before you have. Then import your database file through browse.
If your database name exmaple.sql then create database name will be example and import example.sql
I have installed Umbraco via WebMatrix, and entered "server=(localdb)\v11.0;integrated security=true" as a connection string. The site works fine, but I can't find the database that Umbraco have created. When I open the (localdb)\v11.0, it's not there.
I have tried searching whole system with *.mdf. but no luck. Where can the data be?
I am using umbraco 4.8.0
Most likely the database is in the user profile folder of the account that Umbraco is running under. See this post for more complete explanation. You may also want to look at this other post about why LocalDB by default puts the database file in the root of the user profile of the account it runs under.
I have found it. With no Database defined, SQL server uses the first or the default database in the list, which appears to master database. SSMS and such, don't display tables of system objects, so I found the tables by querying the database.
Working on a project for myself doing OpenID integration with a simple MVC3 RC2 webapp.
I'm using AspNetSqlProvider as the provider, and asp.net configuration can see / modify the database (add users / roles, etc.)
My next step was to add a table to the DB to store userIDs to OpenIDs.
However, I cannot see the database under the App_Data folder in my solution. Previously with ASP.NET / VS 2010 I thought I remembered being able to click on the DB file under that directory in my solution to connect to it.
Does anyone have an idea why it is there and works and yet I'm unable to see it in my VS solution?
Thanks in advance for any help you can give!