Menu

connect to mysql server via command line

PHP+MySQL
Duy Dinh
2013-09-03
2013-09-09
  • Duy Dinh

    Duy Dinh - 2013-09-03

    mysql --host=localhost --port=3306 -u root -p

     
  • Duy Dinh

    Duy Dinh - 2013-09-09

    #to load data from file, connect to mysql with option --local-infile=1

    mysql --local-infile=1 --host=127.0.0.1 --port=3306 -u root -p

    load data local infile '/home/duy/programs/openemr-4.1.2/internationalization/openemr_language_table - Sheet1.csv'
    into table lang_definitions
    FIELDS TERMINATED BY '\t'
    LINES TERMINATED BY '\n'
    (cons_id, lang_id, definition)
    SET def_id = NULL;

    #if you have an auto incremental key, set the id to null;

     

    Last edit: Duy Dinh 2013-09-11

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.