mysql 1064 syntax,MySQL 1064 (42000) Syntax Error - while copy/pasting recommended code (update user...

作者分享了遇到的问题,试图在没有root权限的情况下更改MySQL密码,但无论从何处复制的SQL语句都导致语法错误。探讨了可能的原因及解决建议,包括使用本地开发环境如XAMPP或LocalbyFlywheel。
摘要由CSDN通过智能技术生成

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 6 days ago.

Improve this question

This is an edit to comply with stackoverflow rules.

My original question for a small private offline diary was solved BY RITWIK MATH'S SUGGESTION BELOW.

My curiousity is still why I could not copy-paste mySQL syntax from all kinds of websites, including here, without getting syntax errors.

I'm going to close this myself tonight - I'm just still curious. Thanks!

Basically, I can't use help websites or how tos on this because I'm getting Syntax errors on copy-and-paste:

[...]

But I have no access to the "root" password and can't change it, because whatever I copy-paste from all websites, I'm getting 1064/42000 Syntax errors around the NEWPASSWORD and ROOT terms.

[...]

mysql> update user set authentication_string=password('NEWPASSWORD') where user='root';

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('NEWPASSWORD') where user='root'' at line 1

I've tried all variations I can imagine (I tried backticks, too, not knowing if what looked like 'user' was user).

I think a syntax error is unlikely if code is found in so many places, so what's wrong??

[...]

Thanks a lot!!

# Answer 1

4d350fd91e33782268f371d7edaa8a76.png

You can always go for XAMPP... I personally host my wordpress website locally using XAMPP... Another great alternative is Local by flywheel... this the link ... https://localwp.com/

Stop copy pasting without understanding at least the basics...

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值