unable to select the wordpress database - php

Unable to select the wordpress database.
I am using WAMP server in windows 7 OS
while configuring the wordpress i am getting this kind of error
Thanks

It looks like you are not creating the database.You need to create database schema first manually. First Create database in Phpmyadmin. And give that name in your configuration file.

Make sure the database name you have given in wp-config.php is correct. Check if the database user name and password is correct. Also check if the user has the privilege to access the database.

Some times the problem appears when you have everything right there!!
So if you make sure you have created a database, giving the database name correctly while installing and you still are seeing the error, then:
1>> go to the root of your server
2>> Edit the file wp-config.php, set everything there manually, its that easy ;)
That should work for you!!

Related

while executing via localhost I got these error. How to resolve it?

I want to run magento site using localhost. I downloaded it through site and tried to run it using localhost but it gives me all these error.
I exactly don't know the idea what exactly is going on, in files what changes are required to run the code. If this error is related to database then from where I will get the username, password & localhost name.
Can anyone please help me sort this problem?
Open the file in app/etc/local.xml
Check/Edit the DB credentials
For URL, open table core_config_data
change the value of web/unsecure/base_url and web/secure/base_url with your required value e.g. example.com/
Note that if you are working on localhost then you have to create Virtual Host with site name.

mysql database connectivity issues

I was following this guide: http://mrbool.com/how-to-create-a-login-page-with-php-and-mysql/28656 to create a login page. I followed everything to the letter but when I uploaded the two files (login.html and connectivity.php) to my public_html folder of my godaddy linux shared hosting server and attempted to test it out, I was met with a blank page when I navigated to: mydomainname.com/connectivity.php. Now after reviewing the code within connectivity.php, my suspicion was that my mistake lay somewhere in my database setup. This is what I am referring to:
I changed the database name "practice" to the actual name of my database that I created through godaddy. I got a little bit stuck on the "DB_USER" section though. I added a user to my database through godaddy's mysql application and changed the name "root" to the name I set for the user. Here is what I'm referring to:
After I did that I changed the "DB_Password" to whatever I had set for the username's password. I thought at this point I was done but when I attempted to navigate to the page, it still didn't work. I know the "DB_HOST" is set to localhost but I wasn't sure what I was supposed to change that to since phpMyAdmin panel stated the following: "Server:localhost" even though I'm using a server. I added all the tables and users to the mysql database correctly so I really think this has something to do with my configuration. If anyone could help me I would greatly appreciate it. Thanks.

Disable Captcha on admin login page from database or codebase or CLI in magento?

I just pulled down a copy of a customers live site to correct some plugin issues and set up a demo site on our local dev server, but I cannot get into the administration panel of the site due to a broken captcha (the captcha image does not display, so entering it correctly is pretty much impossible).
I do however have access to the codebase and the database, so if I can toggle this off somewhere, remove something from config.xml or comment out a line to temporarily shut it off until I can get in and disable it correctly, that would be perfect, because I only really have about ten minutes of work to do in the backend.
This issue is due to a missing resource, probably due to some DNS setting somewhere that doesn't match up with the URL on our dev server, though I don't know exactly where. The customer is running Magento EE v.1.13.0.2 if that is relevant. Thanks in advance.
Search on core_config_data table in your database .Search admin/captcha/enable on run the below code
Update
core_config_data set value=0
WHERE path LIKE '%admin/captcha/enable%'
insert into core_config_data (scope,value,scope_id,path) values ('default',0,0, 'admin/captcha/enable');
Remove the cache
Solution:
For Magento 2.x & higher versions
If you have access to Database:
Run the following query
SELECT * FROM `core_config_data` where path LIKE "%captcha%"
Set both the rows to 0
If you have access to code base
Remove the backend_login form entry in the following config file
Magento\vendor\magento\module-captcha\etc\config.xml
Don't forget to Flush the cache : php bin/magento cache:flush
NOTE: Once login in to admin revert the code changes.
We were having similar issues, after duplicating & moving an existing site to a new domain.
The other answers here helped but did not entirely solve the issue. When attempting to login it would silently error and not login.
To fix this we did the following:
Search in the core_config_data table in your database for the web/cookie/cookie_domain entry, and ensure the value here is correct for the new domain.
I just figured this out actually, I navigated to /app/code/core/Mage/Captcha/etc/config.xml and removed the following node (required sudo vi because it was read only):
<admin_user_authenticate_before>
<observers>
<captcha>
<class>captcha/observer</class>
<method>checkUserLoginBackend</method>
</captcha>
</observers>
</admin_user_authenticate_before>
I still like Amit's answer better because it does not require manually editing any files in the core, but this also works and I wanted to put this up as an option in case someone had the same issue in the future and did not have access to the database. Probably a good idea to restore the config to it's original state when you are done, unless you need to get back to the backend in the ongoing sense. I do like doing it through the database better though when possible.
After logging in, I restored the file to it's original state and disabled the captcha properly through the backend.
On M2.4 disable admin google recaptcha
select * from core_config_data WHERE path LIKE '%recaptcha_backend%';
update core_config_data set value=NULL WHERE path LIKE 'recaptcha_backend/type_for/user_login';

WordPress migrate sufficient permissions error

I have a strange problem, that I have never encountered.
I migrated web-site from my PC to the server. Well, I have done this a lot of times, but never encountered this issue.
Ok, what I did is, i copied the theme and exported the database and imported on the server + I replaced the table prefixes from wp_ to site_ to match the servers pre-made WordPress installation prefixes.
The page works fine, but, when I log in as an administrator ( there are no other users, then the admin ) I get this error:
And when I open the actual page I see this:
The white line one the top is where the admin menu should be.
It seems, that the user has actually logged in, but somehow is getting rejected from the server?
I know that this is a small isue that can be solved, by reinstalling WordPress with the exact settings that I have on my local PC, but I want to know why this happened and how to actually fix it.
PS: There are no addons involved in this. Just my custom theme.
It looks like you're being logged in, but your account doesn't have administrator privileges. Go to your site_usermeta table in the database and confirm that the meta_key and meta_value are using the correct prefix. They should be site_capabilities, site_user_level etc instead of wp_capabilities and wp_user_level etc. Also make sure that site_capabilities is set to administrator.
Additionally, check the site_options table to see if there are any option_names that are still using wp_ and not site_ Essentially, if you changed the prefix in the config file, you will need to change all entries of the prefix in your MySQL database as well.
Here's a good resource to follow: http://www.wpbeginner.com/wp-tutorials/how-to-change-the-wordpress-database-prefix-to-improve-security/

cakephp is not able to connect to database

I am a cakephp newbie and I tried to setup my connection to mysql. I had it worked before but after I changed my mysql database name, it won't connect anymore even thought I changed the database name in database.php inside the config folder. Do I have to run the cakephp console again??
Your tmp directory is writable.
The FileEngine is being used for caching. To change the config edit APP/config/core.php
Your database configuration file is present.
Cake is NOT able to connect to the databa
Above is the message shown.
Any ideas what I have to do? Thanks a lot!
Make sure that the new database allows the user in the database.php file to have access to the new database. Look at the MySQL GRANT syntax.

Categories