WordPress to begin learning Databases - wordpress

I am inspecting WordPress' wp-config.php file. I used this guide to help go through things a bit "A guided tour of wp-config.php."
However, most of it was mostly just repeating the name of variables.
These define statements let us use define('DB_PASSWORD', 'somePass');.
What is this "method" actually doing?
Bonus question. I have a password in that method; however, it is encrypted. Is that what the database is looking for or does it want the plaintext password? If so, where is the algorithm to decrypt that password?

Happy to help,
define('DB_PASSWORD', 'somePass'); is the MYSQL password to your website database.
Example:
define('DB_NAME', 'name_of_your_database');
define('DB_USER', 'mysql_user_name');
define('DB_PASSWORD', 'mysql_password');
This tells Wordpress to look for Database: name_of_your_database with your MYSQL user credentials Username: mysql_user_name and Password: mysql_password

Related

How can I create a Pentaho Data Integration repository in a sqlite3 database?

I wanted to create a repository to store transformations and jobs in it. I don't want to install a heavy weight RDBMS, and since Kettle/Spoon can deal with SQlite3 Databases I thought, I could use a SQlite3 Database.
So I created a new database file using the shell and I used the Repository Manager to create a new database connection to this new database file.
It worked, no problem. It also doesn't matter which user password combination I use: the test is successful.
My connection details look like this:
All database tables seem to be in place:
But when I want to access the repository, I'm being asked for a password. I use admin:admin, but I'm getting this message:
I checked the r_user table in the database. I was considering, to change the password there, but I read here that the default password is admin.
I was also thinking, that it's the database user and password that is required, but since it's a sqlite3 DB there is no such thing as a user and password to access it.
Anyone can help, please?
It's a bit embarrassing, but I'm not sure for whom, but...
If you open up the repositories.xml in .kettle directory, you'll see this:
That's a version where I didn't supply a password for the DB User (not the repository user). In this case you see the text Encrypted in between the <password> tag.
If you delete this text (leaving the <password> tag empty) the connection to the repository works (with user admin and password admin for the repository connection).
If you specified a password for the DB connection the encrypted password is stored in the repositories.xml file. But it's also prefixed with Encrypted. If you delete the prefix and leave the encrypted password intact it also works.
Since it's a sqlite3 database it doesn't matter what's the password, though.
Hope someone else will find this helpful.

How to change the password for phpmyadmin

Recently I installed the Bitnami Wordpress canned deployment on Google Cloud Platform.
I can view the phpMyAdmin instance at a local address (http://127.0.0.1:8888/phpmyadmin/) but I cannot determine the username and password to log into the database cluster. I have tried the username specified in Deployment Manager, but the temporary password is not working. When I attempt to login, I receive the following error:
mysqli_real_connect(): (HY000/1045): Access denied for user 'user'#'localhost' (using password: YES)
I have tried to use various common passwords, such as root/root, with no success. If we assume the password is lost, how I can I figure out the password, recover it, or change it by using an SSH shell to the hosting compute instance?
Resetting password by supporting team if possible try
This issue seems related to phpmyadmin. I found this similar post where they stated:
This is asking for your MySQL username and password.
You should enter these details, which will default to "root" and ""
(i.e.: nothing) if you've not specified a password.
UPDATE
Have you tried to create a new user or change the password? Check this guide on how to do it.
Bitnami Engineer here,
As our guide mentions, once you create the SSH tunnel to access phpMyAdmin, you need to use the user 'root' and the password we configure at boot time (it's the same password we configure in the application). More information in our documentation
https://docs.bitnami.com/google/components/phpmyadmin/
Oh it's opened now, the user was (root) which it's not mentioned anywhere when i created the instance, the password is the one which generated by Bitnami when the instance is created on the bitnami platform lunchpad website.
the password is used for 2 users :
username: user
username : root (hidden) for new users who are decided to try cloud servers is not easy to figure this username and which password must use.
thanks for trying to help.

WordPress I changed database user password and site cannot connect database since

I recently changed my user password at the Bluehost database and since then my website doesn't work. The page shows: Error establishing a database connection. I tried to change the password back but it doesn't work. Can you help me to fix it? Thank you!
If you changed the user/pass of the database, you also have to change the user and password in the wp-config.php file which is in the wordpress root directory.
The only time that WordPress doesn’t like it if you change the database password is if you don’t change in on the database user and in the wp-config.php file. Both have to be done together.
define('DB_NAME', 'database-name');
define('DB_USER', 'database-username');
define('DB_PASSWORD', 'database-password');
define('DB_HOST', 'localhost');

Unable to login into wp-admin

I have created the blog for my website using WordPress. Earlier i was able to login to the WP-admin but currently i am not able to this and I am not getting any errors whether i am entering the correct username/password or in correct it always redirecting me to WP-login.php
I have not changed any WordPress files or anything database related. i don't understand how it was working before and not now.
please suggest something that could be the problem and a fix to try.
I have tried a couple of fixes but nothing has worked yet.
This is how my config connects to the database.
/** The name of the database for WordPress */
define('DB_NAME', 'blog');
/** MySQL database username */
define('DB_USER', 'test');
/** MySQL database password */
define('DB_PASSWORD', 'test#12345');
/** MySQL hostname */
define('DB_HOST', 'localhost');
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');
First open your blog
then
Go to the wp-config.php
That's all, stop editing! Happy blogging. */
After this line write
define('RELOCATE',true);
then you will be able to login into the blog after that you change the blog url may be you have missed http:// or www or some problem in url the save it then again go the wp-config.php
and comment the line
define('RELOCATE',true);
That' all you have done
You can access your database through phpmyadmin?
Then go to wp_users table and clear your passwort nearby your username.
Go to http://www.miraclesalad.com/webtools/md5.php type in your password and copy the resulting MD5 hash back in the field which you cleared.
Usually after this the password you inserted, is working in wp-login.
If you got the "cannot connect to database errror" problems can occur if your selected database "blog" maybe have different privileges.
Go to phpmyadmin and check your user privileges for "blog" or try to type in the wp-config for the default user root with no password.
DB_USER: "root"
DB_PASSWORD: ""

login with a wordpress generated password in a non-wp environment

My client gave me a bunch of databases with wordpress generated passwords. Now he wants me to make a login system, but not with wordpress (I must use those wp-generated passwords). Is there a way to make use of those passwords?
Thanks!
IF you know what algorythm was used to encrypt passwords in your Wordpress database, you can easily write your own function for comparing passwords for your login system using the same HASH.
Here is some more info on WP_HASH: http://codex.wordpress.org/Function_Reference/wp_hash_password
EDIT: Very good article about Wordpress Password Hashes: http://resources.infosecinstitute.com/wordpress-password-hashes/

Resources