How can I change mysql port from 0 to 3306?

前端 未结 7 2096
轻奢々
轻奢々 2021-02-19 03:27

I find it hard to establish a link between jdbc and mysql. I think one of the reasons is the mysql port. I checked the port with the statement: \"show variables like \'port\';\"

7条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-19 03:43

    On my ubuntu install, in /etc/mysql/my.cnf theres a line that says :

    [mysqld]
    port = 3306
    
    

    Try changing this value accordingly and restarting mysql.

    Hope it works for you.

提交回复
热议问题