20070315a

From Wsms

Jump to: navigation, search

previous next
GO TO:
Parent class notes: MySQL class notes
Angelica's complementary notes



Thursday March 15 2007

Contents

Technet Subscription

Currently, as a Technet member, you have access to current Microsoft software without timebomb or limitations. Technet Plus Direct is $349/yr plus tax. So for twelve months you get the rights to download and use any MS software. You also get two support incidents per year, managed newsgroups, onlince concierge and E-learning.

Download include Applications, Operating Systems, Virtual Machines, Server software, Development tools. Basically, lots and lots of stuff.

For an additional $100, you get the CDs/DVDs delivered monthly.

Visual Studio might not be included.

MySQL cavaet with FULLTEXT indexes

See MySQLFULLTEXT for the limitations and 20070314a#Huck_Finn for a satisfactory working example.

LOAD

See: http://dev.mysql.com/doc/refman/5.0/en/load-data.html and http://dev.mysql.com/doc/refman/5.0/en/loading-tables.html

MySQL Support Facilities

mysqladmin

mysqldump

Try the following:

[ggeller@ws05 sampdb]$ man mysqldump

This gives you a backup of all your databases that you can store away.

[ggeller@ws05 sampdb]$ mysqldump -u root -p --all-databases > backup.mysqldump
Enter password:
[ggeller@ws05 sampdb]$ head backup.mysqldump
-- MySQL dump 10.10
--
-- Host: localhost    Database:
-- ------------------------------------------------------
-- Server version       5.0.27

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
[ggeller@ws05 sampdb]$

webmin

Install MySQL on Linux

Login as root, or do su - to become root, then:

[root@ws05 ~]# yum -y install mysql-server mysql
[root@ws05 ~]# service mysqld start
Initializing MySQL database:  Installing all prepared tables
Fill help tables

To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h ws05.rop.ncc.sdccd.net password 'new-password'
See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
                                                           [  OK  ]
Starting MySQL:                                            [  OK  ]

[root@ws05 ~]# chkconfig mysqld on

I did the same thing a couple of weeks ago. See 20070306a#Installing_MySQL_under_Linux

Set the root password

mysql> set password for root@ws05.rop.ncc.sdccd.net=password('P@ssw0rd');
Query OK, 0 rows affected (0.00 sec)

mysql> set password=password('P@ssw0rd');
Query OK, 0 rows affected (0.00 sec)

Delete the anonymous accounts

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> delete from user where User='';
Query OK, 2 rows affected (0.00 sec)

mysql> delete from db where User='';
Query OK, 2 rows affected (0.00 sec)

password and old_password functions

Joe says there is an old_password function that is included for compatibility with php. But, the old_password and password functions do the same thing:

mysql> select old_password('P@ssw0rd') = password('P@ssw0rd');
+-------------------------------------------------+
| old_password('P@ssw0rd') = password('P@ssw0rd') |
+-------------------------------------------------+
|                                               1 |
+-------------------------------------------------+
1 row in set (0.00 sec)

mysql> select password('P@ssw0rd');
+----------------------+
| password('P@ssw0rd') |
+----------------------+
| 44d0372963d3fb50     |
+----------------------+
1 row in set (0.00 sec)

mysql> select old_password('P@ssw0rd');
+--------------------------+
| old_password('P@ssw0rd') |
+--------------------------+
| 44d0372963d3fb50         |
+--------------------------+
1 row in set (0.00 sec)

This may be due to the line in /etc/my.cnf that reads:

old_passwords=1
Personal tools