<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://techdoku.nogafam.es/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://techdoku.nogafam.es/feed.php">
        <title>NoBIGTech Wiki Técnico - docu:csheet:sysadm:db:my</title>
        <description></description>
        <link>https://techdoku.nogafam.es/</link>
        <image rdf:resource="https://techdoku.nogafam.es/lib/exe/fetch.php?media=wiki:dokuwiki.svg" />
       <dc:date>2026-04-28T15:10:54+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:db:my:57_date_problem&amp;rev=1582817170&amp;do=diff"/>
                <rdf:li rdf:resource="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:db:my:create_user&amp;rev=1581330493&amp;do=diff"/>
                <rdf:li rdf:resource="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:db:my:database_migration_help&amp;rev=1623934876&amp;do=diff"/>
                <rdf:li rdf:resource="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:db:my:docker_run_easy&amp;rev=1614203753&amp;do=diff"/>
                <rdf:li rdf:resource="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:db:my:restore_1table&amp;rev=1583316342&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://techdoku.nogafam.es/lib/exe/fetch.php?media=wiki:dokuwiki.svg">
        <title>NoBIGTech Wiki Técnico</title>
        <link>https://techdoku.nogafam.es/</link>
        <url>https://techdoku.nogafam.es/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
    </image>
    <item rdf:about="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:db:my:57_date_problem&amp;rev=1582817170&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-02-27T15:26:10+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>57_date_problem</title>
        <link>https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:db:my:57_date_problem&amp;rev=1582817170&amp;do=diff</link>
        <description>How to fix 5.7 datetime field problems on dump/restore



If you ever step yourself in front of a MySQL 5.7, you better hide your head in the sand, if there is no choice and you have to fix it anyways, issue this command on a mysql cli before restoring/executing SQL commands</description>
    </item>
    <item rdf:about="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:db:my:create_user&amp;rev=1581330493&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-02-10T10:28:13+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>create_user</title>
        <link>https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:db:my:create_user&amp;rev=1581330493&amp;do=diff</link>
        <description>Create a new user in MySQL

Cheat sheet:




CREATE USER &#039;newuser&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;password&#039;;
CREATE USER &#039;newuser&#039;@&#039;%&#039; IDENTIFIED BY &#039;password&#039;;
CREATE USER &#039;newuser&#039;@&#039;127.0.0.1&#039; IDENTIFIED BY &#039;password&#039;;

GRANT USAGE ON *.* TO &#039;newuser&#039;@&#039;localhost&#039;;
GRANT ALL PRIVILEGES ON *.* TO &#039;newuser&#039;@&#039;localhost&#039;;
GRANT ALL PRIVILEGES ON db.table TO &#039;newuser&#039;@&#039;localhost&#039;;</description>
    </item>
    <item rdf:about="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:db:my:database_migration_help&amp;rev=1623934876&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-06-17T13:01:16+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>database_migration_help</title>
        <link>https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:db:my:database_migration_help&amp;rev=1623934876&amp;do=diff</link>
        <description>Helping commands when migrating MySQL databases to different servers



If you have a full databases dump in a single file, you can get only the dump for the wanted database, by doing this commands:


# search for the create database sentences and track yours (get the line number)
grep -inP &#039;^create database&#039; all-databases-dump.sql

# imagine, the line number given by the previous command, is 564, then you&#039;will do:
tail -n +564 all-databases-dump.sql &gt; yourapp-dump.sql</description>
    </item>
    <item rdf:about="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:db:my:docker_run_easy&amp;rev=1614203753&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-02-24T21:55:53+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>docker_run_easy</title>
        <link>https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:db:my:docker_run_easy&amp;rev=1614203753&amp;do=diff</link>
        <description>Automatically run a mysql interactive shell to the configured db on docker



This simple command will execute an interactive shell on the configured database on a docker container using the environment variables configured on the container.


mysql -u$MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DATABASE</description>
    </item>
    <item rdf:about="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:db:my:restore_1table&amp;rev=1583316342&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-03-04T10:05:42+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>restore_1table</title>
        <link>https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:db:my:restore_1table&amp;rev=1583316342&amp;do=diff</link>
        <description>Restore 1 table from a Database dump



You may sometimes need to restore just one table from a database dump in another database, this will do the job pretty well in standard cases.


sed -n -e &#039;/CREATE TABLE.*`table_users`/,/CREATE TABLE/p&#039; thedbdumpfile.sql | tr &#039;\n&#039; &#039; &#039; 2&gt;&amp;1 | grep -oP &#039;.*UNLOCK TABLES;</description>
    </item>
</rdf:RDF>
