Comandos típicos de mysql

Lista de comands básicos de MySQL
  • $ mysqladmin -u root password "PONAQUITUPASSWORD"
  • $ mysqladmin -u root -p oldpassword newpassword
  • $ mysqldump -p -u username mydatabase > mydata.sql
  • $ mysql -p -u username mydatabase < mydata.sql
  • $ mysql -u root -p
  • mysql> show databases;
  • mysql> use [db name];
  • mysql> show tables;


EDIT 12/2018

Para darle a un usuario acceso a TODO (en plan root)

Comandos SMTP

En esta dirección explican cómo mandar un email desde Telnet.

Now give your email address:
MAIL FROM: mail@domain.ext
Should yeild:
250 2.1.0 mail@domain.ext... Sender ok
If it doesn't please see possible problems.

Now give the recipients address:
RCPT TO: mail@otherdomain.ext
Should yeild:
250 2.1.0 mail@otherdomain.ext... Recipient ok
If it doesn't please see possible problems.

To start composing the message issue the command DATA

If you want a subject for your email type Subject:-type subject here- then press enter twice (these are needed to conform to RFC 882)

You may now proceed to type the body of your message (e.g. hello mail@otherdomain.ext from mail@domain.ext)

To tell the mail server that you have completed the message enter a single "." on a line on it's own.
The mail server should reply with: 250 2.0.0 ???????? Message accepted for delivery

You can close the connection by issuing the QUIT command.
The mailserver should reply with something like:221 2.0.0 mail.domain.ext closing connection
Connection closed by foreign host.

Here are a list of problems I've encountered and their fixes
501 Sender domain must exist
The domain that you are sending from must exist

503 Need MAIL before RCPT
A recipient has been specified before a sender.

550 mail@domain.ext... Relaying Denied
The mail server has refused to relay mail for you, this may be for any number of reasons but typical resons include:
Not using this provider for an internet connection and/or
Not using an email address provided by the owner of the server.

Some things to watch out for:
1. If you type too quickly, sometimes it won't recognise your text (weird!)
2. The backspace key sometimes does not work with some telnet clients (even though it may seem as though it does)

I'll be putting more as and when I get them and figure out how to fix each problem.

Espero que te haya servido...

Suscribirse a RSS - scripting