1.ssh连接服务器,操作sql:
c
//连接到远程服务器:
ssh zhang@172.18.18.155
//输入服务器密码
123445
2.登录到MySQL数据库:
c
//mysql -u用户名 -p密码 [-h数据库服务器IP地址 -P端口号]
mysql -u root -p
//输入MySQL数据库的密码
root
3.切换到正确的数据库:
c
USE zmData;
4.执行查询:
c
SELECT * FROM ims_info WHERE id = 202;
5.删除数据:
c
DELETE FROM ims_info WHERE id = 14;
6.更新数据:
c
UPDATE ims_info SET cover_url = '["https://zxm/banner_Info/zmnN.png"]' WHERE id = 203;