Never use the root user. Create another user with full access privileges and a password for maximum security.
I should also create a table
No – WordPress will handle this during the installation process.
If you’re running EasyPHP, it comes with PhpMyAdmin via the right-click context menu: Configuration -> PhpMyAdmin.
Start up PhpMyAdmin
Select the Privileges tab
Select Add new User
Add the new user’s name & password (make a note of these settings)
Select “Grant all privileges on database ‘db_name'”
Select “Go”.
I’ve followed the steps, but when installing wordpress on localhost (127.0.0.1:8888) it won’t pass by step 1, where I’ve to input username, password, database name, database host (tryed both localhost and 127.0.0.1:8888).
I press Submit and nothing happens.
I would check the port number (that is the :8888).
If you can login via phpMyAdmin and select your wordpress database you should see at the top “Server:[sever name or IP]:[Port]” so it might be something like Server:localhost:8888. The part AFTER Server: is the hostname you need to add in your installation menu. Check your username and password are correct and the name of the database exists while you are logged in.
You were right datasoftict, but in phpMyAdmin in top left corner doesn’t display the port only 127.0.0.1
I’ve installed MySQLWorkbench and when trying to connect I saw that it use port 3306 and WP worked with 127.0.0.1:3306
So apache is on 8888 and mysql is on 3306.
1 .Where can I change mysql port ?
2. And also where can I see the port except mysqlworkbench.
3. The user should be create right after i open phpmyadmin, or after I click on the left on wordpress_db ?
4. How can I create a db for wordpress, a user and set/change the password, just connecting to mysql without phpmyadmin, it’s too confusing.
5. The db password is hardcoded (just simply displayed) in wp-config.php ? Isn’t that dangerous ?
6. Why wp isn’t giving an error and a reason when something is wrong as my port before, it’s just staying like that.
7. If I manually edit wp-config.php, what’s with those keys ? Can I write whatever I want or is a rule ? What are they using for ?
Thanks
I can’t answer any of the questions regarding the design of WP as I didn’t design it.
To take your questions one at a time.
I amg gettting confused as to what you are doing. If you have root as a user without a password I would assume you are running this on your own server. I might be wrong but most hosting companies will assign a user name and password to you and this is how you connect. They will not pass root out as a user login.
1. I don’t think you need to change your mysql port. It is set up on your server, mysql will ‘listen’ on port 3306 that is where you need to send your requests.
2. If workbench can connect you to the Database, then use the same connection information to connect your WP installation to the database. Databases use connection strings, what works for one program that connects into your DB should work for all.
3. In phpMyAdmin go into priveledges and then select add new user. This is per installation, not per database. Add the new user details – I can’t tell you the settings as I don’t know what versions you are using. Basically use textfields, local and give the permissions you want the user to have.
4. You seem to have a wordpress DB in that you say “or after I click on the left on wordpress_db ?” so the wordpress databse must exist.
5. 6. To do with WordPress and I will not comment on these points.
7. The keys in wp-config are unique and allow secure communicatiuons/session files. Read this for more information. http://codex.wordpress.org/Editing_wp-config.php#Security_Keys
I am sorry, I pressed post by mistake when reviewing my answer.
When you have set up your new user, check with workbench that that user can connect to the mysql database then use those details in you wp-config. I am not sure but I would imagine the reason you have a problem with root connecting is because there is no password and WP will check for a valid password field.
As has been said root should never be used for connections. I gives the login all system permissions, which is very bad news.
Thank you for your comprehensive answer.