• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Mysql
 

Mysql

on

  • 2,529 views

Relates to LAMP

Relates to LAMP

Statistics

Views

Total Views
2,529
Views on SlideShare
2,525
Embed Views
4

Actions

Likes
0
Downloads
43
Comments
0

2 Embeds 4

http://www.a3xvv.com 3
http://www.slideshare.net 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Mysql Mysql Presentation Transcript

    • 10 th planet technologies ArjunRaj.d
      • Mysql
      • INSTALL
      • UNINSTALL
      • SETUP
      • CONFIGURE
      • BASIC SQL,ADVANCED SQL
    • Installation
      • Step #1: Download MySQL 4.1.18
      • Download MySQL 4.1.18 (1 Jul 2005, 25.1MB)
      • Filename: mysql-essential-4.1.18-win32.msi
      • MD5 checksum: 40be516916b82b4b6af699ec3873917f (What's this?)
      • For archives of various MySQL versions
    • a:
      • Step #2: Install MySQL
    • b:
      • 2.Select a setup type - Typical, Complete, Custom. Select Typical and click Next. The default insllation directory will be C:Programs FilesMySQLMySQL Server 4.1.MySQL version 4.1.18 installation setup type.
    • c:
      • 3.Ready to install MySQL. After review the settings, click Install. If you want to change any settings, click [Back] button
    • d:
      • Installation in progress.
    • e:
      • 5.MySQL.com Sign-Up. If you don't want to sign-up at this stage, select Skip Sign-up and click Next.
    • f:
      • 6.Setup Wizard Completed. Make sure you have selected 'Configure the MySQL Server now' checkbox if you want to configure it after click Finish button.
    • Setup MYSQL
      • Mysql is a popular open source database which being used as database server by many organizations around the world
      • Mysql is used together with PHP server-side scripting language, Apache web server and Linux as the server platform
      • root@slackware:~# less /etc/passwd | grep mysql
      • mysql:x:27:27:MySQL:/var/lib/mysql:/bin/false
      • root@slackware:~#root@slackware:~# less /etc/group | grepmysqlmysql:x:27
    • a:
      • root@slackware:~# ls /var/run/ | grep mysql
      • mysql/
      • root@slackware:~#
    • b:
      • Create a new directory named mysql in /var/run directory if it's not there. Learn how to create new directory in Slackware in mkdir tutorial. When you are done, check mysql directory ownership. It must be owned by mysql user and mysql group.
      • root@slackware:~# ls -l /var/run/ | grep mysql
      • drwxr-xr-x 2 mysql mysql 4096 2008-10-05 13:29 mysql/
      • root@slackware:~#
    • c:
      • You can change directory ownership with Linux chown command. See the example below:
      • root@slackware:~# chown -R mysql.mysql /var/run/mysql/
      • root@slackware:~#
    • d:
      • Install or upgrade mysql package in your Slackware system. See example on how to install mysql using slackpkg command below:
      • root@slackware:~# slackpkg install mysql
      • Looking for mysql in package list. Please wait... DONE
      • No packages match the pattern for install. Try: /usr/sbin/slackpkg reinstall|upgrade
    • e:
      • If you see the same result as the example below, try running the command again but using slackpkg upgrade option instead. Don't worry of you see the same result again. You probably have mysql installed and upgrade to the latest version already. You can confirm it by checking the installed packages in log directory. See the example below:
      • root@slackware:~# ls -l /var/log/packages/ | grep mysql-rw-r--r-- 1 root root 8159 2009-02-28 01:25 mysql-5.0.67-i
    • Configure mysql
      • If you see the same result as the example below, try running the command again but using slackpkg upgrade option instead. Don't worry of you see the same result again. You probably have mysql installed and upgrade to the latest version already. You can confirm it by checking the installed packages in log directory. See the example below:
      • root@slackware:~# ls -l /var/log/packages/ | grep mysql-rw-r--r-- 1 root root 8159 2009-02-28 01:25 mysql-5.0.67-i
    • a:
      • root@slackware:~# usermod -G mysql mysql
      • root@slackware:~# id mysql
      • uid=27(mysql) gid=27(mysql) groups=27(mysql)
    • b:
      • create a new mysql configuration file called my.cnf
      • root@slackware:~# ls -l /etc/ | grep my
      • -rw-r--r-- 1 root root 4972 2008-10-05 13:29 my-huge.cnf
      • -rw-r--r-- 1 root root 4948 2008-10-05 13:29 my-large.cnf
      • -rw-r--r-- 1 root root 4955 2008-10-05 13:29 my-medium.cnf-rw-r--r-- 1 root root 2525 2008-10-05 13:29mysmall.cnfroot@slackware:~#root@slackware:~# cp /etc/mymedium.cnf/etc/my.cn
    • c:
      • Create mysql database
      • root@slackware:~# mysql_install_db --user=mysql
      • Installing MySQL system tables...
      • 090423 12:35:45 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
      • 090423 12:35:45 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
      • OK
    • d:
      • Filling help tables...
      • 090423 12:35:45 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
      • 090423 12:35:45 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
    • e:
      • 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 slackware password 'new-password'
    • f:
      • Alternatively you can run:
      • /usr/bin/mysql_secure_installation
      • which will also give you the option of removing the test
      • databases and anonymous user created by default. This is
      • strongly recommended for production servers.
      • See the manual for more instructions.
      • You can start the MySQL daemon with:
    • g:
      • cd /usr ; /usr/bin/mysqld_safe &
      • You can test the MySQL daemon with mysql-test-run.pl
      • cd mysql-test ; perl mysql-test-run.pl
      • Please report any problems with the /usr/bin/mysqlbug script!
    • g:
      • To start mysql daemon at boot time, we can change the mysqld script file permission, the /etc/rc.d/rc.mysqld.
      • root@slackware:~# chmod 755 /etc/rc.d/rc.mysqld
      • root@slackware:~# ls -l /etc/rc.d/ | grep mysqld
      • -rwxr-xr-x 1 root root 2585 2008-10-05 13:29 rc.mysqld*
    • h:
      • Create password for mysql root user:
      • root@slackware:~# /usr/bin/mysqladmin -u root password 'new_password'
      • /usr/bin/mysqladmin: connect to server at 'localhost' failederror: 'Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)'
      • Check that mysqld is running and that the socket: '/var/run/mysql/mysql.sock' exists!
    • i:
      • Opss...we got an error there. We forgot to start mysql daemon (mysql server) first. Let's start the server now:
      • root@slackware:~# /usr/bin/mysqld_safe &
    • k:
      • The tool is mysql_secure_installation. It's recommended you run this command
      • In order to log into MySQL to secure it, we'll need the current
      • password for the root user. If you've just installed MySQL, and
      • you haven't set the root password yet, the password will be blank,
      • so you should just press enter here.
      • Enter current password for root (enter for none):
    • Uninstall mysql and remove mysql data
      • Stop mysql service:
      • root@slackware:~# killall -9 mysqld mysqld_safe[1]+ Killed /usr/bin/mysqld_saferoot@slackware:~#
      • Uninstall mysql using slackpkg:
      • root@slackware:~# slackpkg remove mysql
      • Remove remaining mysql data and directory.root@slackware:~# rm-r/var/lib/mysql/root@slackware:~# rm /etc/my.cnf
    • Advanced Sql
      • DB2ASP
      • DB2ASP converts and publishes your database to dynamic asp web pages. DB2ASP creates ASP, HTML, CSS, and JavaScript in minutes, saving hours or even days of work. You can view/add/edit/delete you data via any browser. DB2ASP is for non-programmers an..
    • a:
      • * SQL UNION* SQL UNION ALL* SQL INTERSECT* SQL MINUS
      • * SQL LIMIT* SQL TOP * SQL Subquery * SQL EXISTS * SQL CASE
      • # SQL NULL
      • # SQL ISNULL Function
      • # SQL IFNULL Function
      • # SQL NVL Function
      • # SQL Coalesce Function
      • # SQL NULLIF Function
    • b:
      • * Rank
      • * Median
      • * Running Totals
      • * Percent To Total
      • * Cumulative Percent To Total
    • Configure My sql
      • Start MySQL Server Instance Configuration Wizard.
      • 2.Select configuration type. Because you do not already have another MySQL server installed, choose Standard Configuration.
    •  
      • 4.Set a new password to root account. When MySQL was installed, the password for root account was blank. Now it is time to set a new password to it. Don't select the Create An Anonymous Account checkbox. This can lead to an insecure system.
      • Set a new password to MySQL Server root account.
    •  
      • 5.Now everything is ready to execute. Click Execute button to run it.
      • 6.MySQL server configuration completed successfully.
    • Thank U