我试图将SailsJS与MySql连接
default: {
adapter: require('sails-mysql'),
url: 'mysql://root:root@localhost/ventas'
},
但无论什么时候我都会举起帆船。我收到以下错误:
error: A hook (`orm`) failed to load!
error:
error: { error:
{ Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
at Handshake.Sequence._packetToError (C:\ticket\node_modules\mysql\lib\protocol\sequences\Sequence.js:48:14) }
我只是使用带有风帆的网络应用模板而没有添加代码。
有什么想法吗?谢谢!
答案 0 :(得分:1)
问题来自mysql_native_password
,您需要将插件更改为flush privileges;
然后[FunctionName("FunctionImportCatalogue")]
public static void Run([BlobTrigger("importcontainer/{name}", Connection = "StorageConnection")]Stream myBlob, string name, TraceWriter log)
{}
,请参阅here和here。
答案 1 :(得分:0)
问题可能出在加密密码上。 MySQL 8.0使用caching_sha2_password。您需要将其更改为mysql_native_password:
import createNativeStackNavigator from "react-native-screens/createNativeStackNavigator"
export const NaoLogadoNavigator = createNativeStackNavigator(
{
cadastro: { screen: CadastroScreen },
login: { screen: LoginScreen },
onboard: { screen: OnboardScreen },
},
{
initialRouteName: "onboard"
}
)
答案 2 :(得分:-2)
将密码设置为大写,小写,数字和8个字母长的特殊字符。