System information
Then restart the PostgreSQL server. On CentOS:
$ sudo service postgresql restart
You need to restart the PostgreSQL service because you made changes
to pg_hba.conf, not because you added a new user or changed the pass-
word.
On Ubuntu:
$ sudo /etc/init.d/postgresql-8.4 restart
On Ubuntu 10.10 and newer the version number seems to be dropped,
so it may just be /etc/init.d/postgresql restart.
You can verify your connection to the PostgreSQL server via TCP/IP, like so:
$ psql -h 127.0.0.1 -U asterisk
Password for user asterisk:
Welcome to psql 8.1.21, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
asterisk=>
You’re now ready to move on to “Installing and Configuring ODBC” on page 346.
Configuring MySQL
With the MySQL database now running, you should secure your installation. Con-
veniently, there is a script you can execute that will allow you to enter a new pass-
word
†
for the root user, along with some additional options. The script is pretty
straightforward, and after entering and confirming your root password you can con-
tinue to select the defaults unless you have a specific reason not to.
Execute the following script:
$ sudo /usr/bin/mysql_secure_installation
† If you installed on Ubuntu, you will have already set the root password. You will have to enter that password
while executing the script, at which point it will say you’ve already set a root password, so you don’t need
to change it.
Installing and Configuring PostgreSQL and MySQL | 345