Pular para o conteúdo

MySQL no Debian 6

Dica publicada em Banco de Dados / Introdução
anezio apesjunior
Hits: 11.934 Categoria: Banco de Dados Subcategoria: Introdução
  • Indicar
  • Impressora
  • Denunciar

MySQL no Debian 6

Como pode ser visto com o comando:

# uname -a
 Linux debian 2.6.32-5-amd64 
 #1 SMP Fri Feb 15 15:39:52 UTC 2013 x86_64  GNU/Linux

Instalação

Insira a mídia DVD 1 do Debian 6 e acrescente-a no APT:

# apt-cdrom add

Instale o MySQL Server:

# apt-get install mysql-server

Serão instalado os seguintes pacotes:

libdbd-mysql-perl      4.016-1    Perl5 database interface to the MySQL database
libmysqlclient16       5.1.49-3   MySQL database client library
mysql-client-5.1       5.1.49-3   MySQL database client binaries
mysql-common           5.1.49-3   MySQL database common files, e.g. /etc/mysql/my.cnf
mysql-server           5.1.49-3   MySQL database server (metapackage depending on the latest version)
mysql-server-5.1       5.1.49-3   MySQL database server binaries and system database setup
mysql-server-core-5.1  5.1.49-3   MySQL database server binaries


Após a instalação, crie a base de dados default, ou seja, padrão:

# mysql_install_db

Adicione/Altere a senha do usuário root.

Obs.: a opção -p é para caso tenha esquecido da senha configurada na instalação do pacote MySQL Server:

# mysqladmin -u root -p password 123456

Acesse o SGBD MySQL via console:

# mysql -u root -p
 Enter password:
 Welcome to the MySQL monitor.  Commands end with ; or \g.
 Your MySQL connection id is 39
 Server version: 5.1.49-3 (Debian)

 Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
 This software comes with ABSOLUTELY NO WARRANTY. This is free software,
 and you are welcome to modify and redistribute it under the GPL v2 license

 Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

mysql> \quit
Aborted


Gerenciando o serviço:

# service mysqld start|stop|restart|status

Iniciando o SGBD junto com o sistema:

# chkconfig mysqld on


Abraço!

Nenhuma dica encontrada.

Instalando Firebird2 com FreeAdhocUDF no Debian Linux

Conhecendo a linguagem SQL

Curso SQL grátis

Firebird: Como parar e iniciar no Slackware Linux

Instalação do Firebird 2.1.3

#1 Comentário enviado por leonardoortiz em 02/10/2013 - 21:50h
chkconfig no debian ?

Contribuir com comentário

Entre na sua conta para comentar.