Welcome Guest, Not a member yet? Register   Sign In
About the hostname for mysql
#1

The hostname of my system is "bob" when I echo $hostname. So I set up mysql and database.conf with that hostname. Now I read that, typically, mysql will use 'localhost' as the hostname.

Since I'm having "blank page" problems with CI 2.1.3, could I have messed things up by doing that with the hostname? On top of that, I've forgotten how I set mysql to that hostname in the first place (or did it get it from the system?).
Reply
#2

(07-14-2015, 01:14 PM)drhowarddrfine Wrote: The hostname of my system is "bob" when I echo $hostname. So I set up mysql and database.conf with that hostname. Now I read that, typically, mysql will use 'localhost' as the hostname.

Since I'm having "blank page" problems with CI 2.1.3, could I have messed things up by doing that with the hostname? On top of that, I've forgotten how I set mysql to that hostname in the first place (or did it get it from the system?).

It could be as simple as setting the hostname in the CI configuration:

 /application/config/database
Code:
...
    'hostname' => 'localhost',
...
That should point to IP 127.0.0.1 on your local server (not your system)
CI 3.1 Kubuntu 19.04 Apache 5.x  Mysql 5.x PHP 5.x PHP 7.x
Remember: Obfuscation is a bad thing.
Clarity is desirable over Brevity every time.
Reply
#3

I forgot to say, the server is in a VM, virtualbox, on the same machine.
Reply
#4

(This post was last modified: 07-14-2015, 02:37 PM by twpmarketing.)

(07-14-2015, 02:10 PM)drhowarddrfine Wrote: I forgot to say, the server is in a VM, virtualbox, on the same machine.

I've not used a VM (no room on this system) so I can't address that.

I also assume your server is running Apache, I could be wrong...

Scratch that, I see from your earlier thread that you're running NginX.
The config should be similar, at least on the CI side.
CI 3.1 Kubuntu 19.04 Apache 5.x  Mysql 5.x PHP 5.x PHP 7.x
Remember: Obfuscation is a bad thing.
Clarity is desirable over Brevity every time.
Reply
#5

Is the database hosting on the VM? Do you have port forwarding set up? Do you have an entry on the HOST machine's hosts file to point to the vm? "bob" points to VM's public IP?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB