Forum for discussing general topics related to Couch.
5 posts Page 1 of 1
Hi all, new to this so please forgive me it's been asked previously. I want to test couch cms (ie do the tutorial) on a test website, happy enough with the instructions fully, other than setting up the database?
The server I will be testing this on definitely allows me to set up a database, just not sure if all I need to do is set up the 4 options on the new config.php
database_name
database_username
database_password
these can be made radomly for this tutorial yes? (ie I can create them all as whatever I choose to - I can;t see any details in the tutorial)
And finally, the MySQL hostname - normally localhost? Will this work if I create a dotabase on my test site? For example say my test site is called www.testsitecouch.com and I create the database there in www.testsitecouch.com

looking forward to using couch in the future, looks really cool
tia
sc22
Hello @spacecadet22 :)

I'll try to help you with setting up the database correctly.
Can you please let me know if you are using CPanel/phpMyAdmin to manage your site?

Thanks.
Hi KK
cheers - I'm using parallels plesk on a vps. I can go to the domain>websites&domains>databases>add database
then it asks for
name:
Type is set to: MySQL
Database server is set to: Local MySQL server
I then create a new user with password
and go into myPhpAdmin

make sense?
sc22
Yes, it does.

Since you have already created a database and also the associated user/password, you have all the info you need to put into couch/config.php file (else the following tutorial would have helped - https://make.wordpress.org/support/user ... sql-plesk/).

Replace the highlighted values below with the actual info you have. Leave 'K_DB_HOST' to 'localhost'
// MySQL settings. You need to get this info from your web host.
// 4.
// Name of the database
define( 'K_DB_NAME', 'database_name' );
// 5.
// Database username
define( 'K_DB_USER', 'database_username' );
// 6.
// Database password
define( 'K_DB_PASSWORD', 'database_password' );
// 7.
// MySQL hostname (it will usually be 'localhost')
define( 'K_DB_HOST', 'localhost' );

You asked -
And finally, the MySQL hostname - normally localhost? Will this work if I create a dotabase on my test site? For example say my test site is called http://www.testsitecouch.com and I create the database there in http://www.testsitecouch.com
Databases (as the one you created) are *not* linked with any specific website name. Just use 'localhost' in config file and it should work with any site hosted on the same server.

If in the future you decide to create another site on the same host, just create another database. The user/password can be the same as the one you used in the first database (by associating the existing user with the second database). Again specify 'localhost' in config and you'll get connected to the new database.

Hope it helps.
Hi thanks for that, I'll get cracking on it later - I'll let you know how I get on.
sc22
5 posts Page 1 of 1