数据库创建失败,错误为Authentication plugin 'caching_sha2_password' cannot be loaded
。
当我运行以下命令时,发生以上错误:
$ RAILS_ENV=test rake db:create
错误消息:
Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/Cellar/mysql@5.6/5.6.46/lib/plugin/caching_sha2_password.so, 2): image not found
Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "reconnect"=>true, "pool"=>5, "socket"=>"/tmp/mysql.sock", "username"=>"root", "password"=>nil, "database"=>"ht_test"}, charset: utf8, collation: utf8_unicode_ci
(if you set the charset manually, make sure you have a matching collation)
我知道其他开发人员的mysql@8.*也有类似的问题。这就是为什么我切换到mysql@5.6
的原因。我仍然面临这个问题。
请提出可能的解决方案。
谢谢
答案 0 :(得分:0)
尝试使用这个,它对我有用
import pandas as pd
data = pd.read_csv("tweets.csv")
import regex as re
def cleaningTweets(twt):
twt = re.sub('@[A-ZÜÄÖa-züäöß0-9]+', '', twt)
twt = re.sub('#', '', twt)
twt = re.sub('https?:\/\/\S+', '', twt)
return twt
df = pd.DataFrame(data)
df.tweet = df.tweet.apply(cleaningTweets)
df.tweet = df.tweet.str.lower()
from textblob_de import TextBlobDE as TextBlob
df["tweet_tok"] = df["tweet"].apply(lambda x: " ".join(TextBlob(x).words))
all_words = ' '.join([text for text in df.tweet_tok])
tweettext = nltk.Text(all_words)