2020-09-24 10:06:36 1975次浏览 3条回答 0 悬赏 10 金钱

请问怎么配置 MySQL 数据库的端口啊?

补充于 2020-09-24 10:19
'dsn' => 'mysql:host=127.0.0.1:13306;dbname=dbnaem',
  • 回答于 2020-09-29 12:07 举报

    你自问自答呀。。。哈哈

  • 回答于 2020-10-09 16:19 举报
    'dsn' => 'mysql:host=127.0.0.1;dbname=dbnaem;port=13306'
    
  • 回答于 2020-10-10 12:02 举报
    The PDO_MYSQL Data Source Name (DSN) is composed of the following elements:
    DSN prefix
    The DSN prefix is mysql: .
    host
    The hostname on which the database server resides.
    port
    The port number where the database server is listening.
    dbname
    The name of the database.
    unix_socket
    The MySQL Unix socket (shouldn't be used with host or port).
    
    charset
    The character set. See the character set concepts documentation for more information.
    
您需要登录后才可以回答。登录 | 立即注册
Mr_Xu
见习主管

Mr_Xu

注册时间:2015-12-22
最后登录:2021-11-02
在线时长:16小时2分
  • 粉丝3
  • 金钱70
  • 威望20
  • 积分430

热门问题