Editing
Infrastructure Machines
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== setup traffic db ==== * Install mysql: <pre>cd /usr/ports/databases/mysql50-server make install clean</pre> cat >> /etc/rc.conf mysql_enable="YES" Move db data dir: /usr/local/etc/rc.d/mysql-server stop mkdir /usr/home/database/ mv /var/db/mysql/* /usr/home/database/ chown -R mysql:mysql /usr/home/database Edit database location in startup script: vi /usr/local/etc/rc.d/mysql-server # : ${mysql_dbdir="/var/db/mysql"} : ${mysql_dbdir="/usr/home/database"} /usr/local/etc/rc.d/mysql-server start * Install mysql perl database modules: <pre> cd /usr/ports/databases/p5-DBI make install clean cd /usr/ports/databases/p5-DBD-mysql50 make install clean (no to SSL support) </pre> * Setting up database <pre> rehash /usr/local/etc/rc.d/mysql-server start mysql -u root create database traffic; grant all on *.* to root@localhost identified by '5over3'; grant all on traffic.* to jc@10.1.4.5 identified by '2gMKY3Wt'; </pre> If this was a new server we'd setup new tables. See [[#mysql_2|mysql]] for how those tables would be setup. We are assuming here we are moving data from an existing db, here's how that's done (from the current traffic db): rsync -av --progress /usr/home/database/traffic/ 10.1.4.203:/usr/home/database/traffic/ When you're ready to do the cutover, shut down mysql on both hosts and do one last sync.
Summary:
Please note that all contributions to JCWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
JCWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information