在Ubuntu上移动MYSQL数据文件夹(Move MYSQL data folder on Ubuntu)

我知道这里有相同的线程, 如何更改MySQL数据目录? ,但是当我尝试了我能找到的所有方法(当然包括这一个)并且仍然没有运气。

我想将我的数据库存储在“/ dlab / data / MYSQL”中。 这个目录(/ dlab)实际上是一个NFS文件夹,如果这很重要的话。

我的/etc/mysql/my.cnf文件:

#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
# 
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port        = 3306
socket      = /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket      = /var/run/mysqld/mysqld.sock
nice        = 0

[mysqld]
#
# * Basic Settings
#
user        = mysql
pid-file    = /var/run/mysqld/mysqld.pid
socket      = /var/run/mysqld/mysqld.sock
port        = 3306
basedir     = /usr
datadir     = /dlab/data/MYSQL
tmpdir      = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address        = 127.0.0.1
#
# * Fine Tuning
#
key_buffer      = 16M
max_allowed_packet  = 16M
thread_stack        = 192K
thread_cache_size       = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover         = BACKUP
#max_connections        = 100
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit   = 1M
query_cache_size        = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file        = /var/log/mysql/mysql.log
#general_log             = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
#log_slow_queries   = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id      = 1
#log_bin            = /var/log/mysql/mysql-bin.log
expire_logs_days    = 10
max_binlog_size         = 100M
#binlog_do_db       = include_database_name
#binlog_ignore_db   = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem



[mysqldump]
quick
quote-names
max_allowed_packet  = 16M

[mysql]
#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]
key_buffer      = 16M

#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/

根据提到的线程,我试过:

编辑/etc/apparmor.d/usr.sbin.mysqld文件,它看起来像这样:

# vim:syntax=apparmor
# Last Modified: Tue Jun 19 17:37:30 2007
#include <tunables/global>

/usr/sbin/mysqld {
  #include <abstractions/base>
  #include <abstractions/nameservice>
  #include <abstractions/user-tmp>
  #include <abstractions/mysql>
  #include <abstractions/winbind>

  capability dac_override,
  capability sys_resource,
  capability setgid,
  capability setuid,

  network tcp,

  /etc/hosts.allow r,
  /etc/hosts.deny r,

  /etc/mysql/*.pem r,
  /etc/mysql/conf.d/ r,
  /etc/mysql/conf.d/* r,
  /etc/mysql/*.cnf r,
  /usr/lib/mysql/plugin/ r,
  /usr/lib/mysql/plugin/*.so* mr,
  /usr/sbin/mysqld mr,
  /usr/share/mysql/** r,
  /var/log/mysql.log rw,
  /var/log/mysql.err rw,

  # /var/lib/mysql/ r,
  # /var/lib/mysql/** rwk,

  /dlab/data/MYSQL/ r,
  /dlab/data/MYSQL/** rwk,

  /var/log/mysql/ r,
  /var/log/mysql/* rw,
  /var/run/mysqld/mysqld.pid rw,
  /var/run/mysqld/mysqld.sock w,
  /run/mysqld/mysqld.pid rw,
  /run/mysqld/mysqld.sock w,

  /sys/devices/system/cpu/ r,

  # Site-specific additions and overrides. See local/README for details.
  #include <local/usr.sbin.mysqld>
}

这不起作用,当我启动MYSQL时,它失败了。

我绑定将文件夹的所有权更改为mysql:mysql,也没有帮助。

尝试了提到的别名,我的/etc/apparmor.d/tunables/alias文件:

# ------------------------------------------------------------------
#
#    Copyright (C) 2010 Canonical Ltd.
#
#    This program is free software; you can redistribute it and/or
#    modify it under the terms of version 2 of the GNU General Public
#    License published by the Free Software Foundation.
#
# ------------------------------------------------------------------

# Alias rules can be used to rewrite paths and are done after variable
# resolution. For example, if '/usr' is on removable media:
# alias /usr/ -> /mnt/usr/,
#
# Or if mysql databases are stored in /home:
alias /var/lib/mysql/ -> /dlab/data/MYSQL,

如果有人对我有任何解决方案,那将是非常好的!

编辑1:

这是错误日志,似乎是具有权限的东西......

151230 13:30:22 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
151230 13:35:11 mysqld_safe Starting mysqld daemon with databases from /dlab/data/MYSQL
151230 13:35:11 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
151230 13:35:11 [Note] /usr/sbin/mysqld (mysqld 5.5.46-0ubuntu0.14.04.2) starting as process 12902 ...
151230 13:35:11 [Warning] Can't create test file /dlab/data/MYSQL/dlab5.lower-test
151230 13:35:11 [Warning] Can't create test file /dlab/data/MYSQL/dlab5.lower-test
151230 13:35:11 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
151230 13:35:11 [Note] Plugin 'FEDERATED' is disabled.
151230 13:35:11 InnoDB: The InnoDB memory heap is disabled
151230 13:35:11 InnoDB: Mutexes and rw_locks use GCC atomic builtins
151230 13:35:11 InnoDB: Compressed tables use zlib 1.2.8
151230 13:35:11 InnoDB: Using Linux native AIO
151230 13:35:11 InnoDB: Initializing buffer pool, size = 128.0M
151230 13:35:11 InnoDB: Completed initialization of buffer pool
151230 13:35:11  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.

给定的文件夹具有适当的权限(我猜):

drwxrwxr-x    4 mysql mysql  4096 Dec 30 13:09 MYSQL

I am aware of the very same thread here, How to change MySQL data directory?, but as i tried all of the methods i could find (including this one of course) and still no luck.

I would like to store my database on "/dlab/data/MYSQL". This directory (/dlab) is actually an NFS folder if that matters.

My /etc/mysql/my.cnf file:

#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
# 
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port        = 3306
socket      = /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket      = /var/run/mysqld/mysqld.sock
nice        = 0

[mysqld]
#
# * Basic Settings
#
user        = mysql
pid-file    = /var/run/mysqld/mysqld.pid
socket      = /var/run/mysqld/mysqld.sock
port        = 3306
basedir     = /usr
datadir     = /dlab/data/MYSQL
tmpdir      = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address        = 127.0.0.1
#
# * Fine Tuning
#
key_buffer      = 16M
max_allowed_packet  = 16M
thread_stack        = 192K
thread_cache_size       = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover         = BACKUP
#max_connections        = 100
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit   = 1M
query_cache_size        = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file        = /var/log/mysql/mysql.log
#general_log             = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
#log_slow_queries   = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id      = 1
#log_bin            = /var/log/mysql/mysql-bin.log
expire_logs_days    = 10
max_binlog_size         = 100M
#binlog_do_db       = include_database_name
#binlog_ignore_db   = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem



[mysqldump]
quick
quote-names
max_allowed_packet  = 16M

[mysql]
#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]
key_buffer      = 16M

#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/

According to the mentioned thread i tried:

Editing the /etc/apparmor.d/usr.sbin.mysqld file, it looks like this:

# vim:syntax=apparmor
# Last Modified: Tue Jun 19 17:37:30 2007
#include <tunables/global>

/usr/sbin/mysqld {
  #include <abstractions/base>
  #include <abstractions/nameservice>
  #include <abstractions/user-tmp>
  #include <abstractions/mysql>
  #include <abstractions/winbind>

  capability dac_override,
  capability sys_resource,
  capability setgid,
  capability setuid,

  network tcp,

  /etc/hosts.allow r,
  /etc/hosts.deny r,

  /etc/mysql/*.pem r,
  /etc/mysql/conf.d/ r,
  /etc/mysql/conf.d/* r,
  /etc/mysql/*.cnf r,
  /usr/lib/mysql/plugin/ r,
  /usr/lib/mysql/plugin/*.so* mr,
  /usr/sbin/mysqld mr,
  /usr/share/mysql/** r,
  /var/log/mysql.log rw,
  /var/log/mysql.err rw,

  # /var/lib/mysql/ r,
  # /var/lib/mysql/** rwk,

  /dlab/data/MYSQL/ r,
  /dlab/data/MYSQL/** rwk,

  /var/log/mysql/ r,
  /var/log/mysql/* rw,
  /var/run/mysqld/mysqld.pid rw,
  /var/run/mysqld/mysqld.sock w,
  /run/mysqld/mysqld.pid rw,
  /run/mysqld/mysqld.sock w,

  /sys/devices/system/cpu/ r,

  # Site-specific additions and overrides. See local/README for details.
  #include <local/usr.sbin.mysqld>
}

This did not work, when i start MYSQL, it fails.

I tied to change the ownership of the folder to mysql:mysql, did not help either.

Tried the mentioned alias as well, my /etc/apparmor.d/tunables/alias file:

# ------------------------------------------------------------------
#
#    Copyright (C) 2010 Canonical Ltd.
#
#    This program is free software; you can redistribute it and/or
#    modify it under the terms of version 2 of the GNU General Public
#    License published by the Free Software Foundation.
#
# ------------------------------------------------------------------

# Alias rules can be used to rewrite paths and are done after variable
# resolution. For example, if '/usr' is on removable media:
# alias /usr/ -> /mnt/usr/,
#
# Or if mysql databases are stored in /home:
alias /var/lib/mysql/ -> /dlab/data/MYSQL,

If anyone has any solution for me, that would be very nice!

EDIT 1:

Here is the error log, it seems to be something with the permissions...

151230 13:30:22 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
151230 13:35:11 mysqld_safe Starting mysqld daemon with databases from /dlab/data/MYSQL
151230 13:35:11 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
151230 13:35:11 [Note] /usr/sbin/mysqld (mysqld 5.5.46-0ubuntu0.14.04.2) starting as process 12902 ...
151230 13:35:11 [Warning] Can't create test file /dlab/data/MYSQL/dlab5.lower-test
151230 13:35:11 [Warning] Can't create test file /dlab/data/MYSQL/dlab5.lower-test
151230 13:35:11 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
151230 13:35:11 [Note] Plugin 'FEDERATED' is disabled.
151230 13:35:11 InnoDB: The InnoDB memory heap is disabled
151230 13:35:11 InnoDB: Mutexes and rw_locks use GCC atomic builtins
151230 13:35:11 InnoDB: Compressed tables use zlib 1.2.8
151230 13:35:11 InnoDB: Using Linux native AIO
151230 13:35:11 InnoDB: Initializing buffer pool, size = 128.0M
151230 13:35:11 InnoDB: Completed initialization of buffer pool
151230 13:35:11  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.

The given folder has the proper permissions (I guess):

drwxrwxr-x    4 mysql mysql  4096 Dec 30 13:09 MYSQL
2022-05-27 10:05

满意答案

问题在于Richard St-Cyr在给出文件夹777并遵循如何更改MySQL数据目录的提示后指出的权限 我管理着解决问题!


The problem was with the permission as pointed out by Richard St-Cyr after giving the folder 777 and following the tips at How to change MySQL data directory? i managged to solve the problem!

相关问答

更多

从数据文件夹备份中恢复mysql数据库(Recovering mysql database from data folder backup)

以下是我处理这种情况的方式: 从xampp控制面板停止 Apache和MySql服务。 备份(以防万一),然后从新的xampp安装文件夹<physical_drive>/xampp/mysql删除data文件夹。 ( data文件夹包含您的表的模式/表定义(.frm文件)。) 将data文件夹从mysql下的前一个xampp文件夹(或备份)复制并粘贴到新位置(即<physical_drive>/xampp/mysql )。 现在从xampp控制面板启动 Apache和MySql服务。 你走了,桌子...

Postgres - 移动数据文件夹(Postgres - Moving Data Folder)

完成移动PostgreSQL数据目录后。 不要忘记restart PostgreSQL服务。 通过命令ps -ef | grep postgres检查PostgreSQL状态 ps -ef | grep postgres 。 -D参数值应该是新目录位置。 错误/var/run/postgresql/.s.PGSQL.5432这意味着你的PostgreSQL服务没有正常启动或启动时失败。 After done moving PostgreSQL data directory. Don't forge...

如何在ubuntu 12.04中更改mysql数据目录(how to change mysql data directory in ubuntu 12.04)

我一直在查看您的更改,并且不需要执行符号链接,套接字更改和/或删除旧目录。 请按照以下步骤操作。 service mysql stop cp -R /var/lib/mysql /array2/mysql chown -R mysql.mysql /array2/mysql 现在备份/etc/my.cnf然后编辑数据目录变量 datadir = /array2/mysql 编辑apparmor规则,通常在/etc/apparmor...

将旧的MySQL数据文件夹移动到新的MySQL安装文件夹是否可以?(Is it OK to move an old MySQL data folder to a new MySQL install's folder?)

你应该查看你的my.cnf文件,看看它指向哪个文件夹作为datadir。 如果删除它指向的文件夹,它将不知道在哪里可以找到您的数据。 您可以将此值更改为指向您希望存储数据的位置。 You should look at your my.cnf file to see which folder it is pointing to as the datadir. If you delete the folder it's pointing to, it won't know where to find ...

如何将数据文件夹备份中的mysql数据库从卸载的xamp恢复到新安装的xamp(How to Recovering mysql database from data folder backup from uninstalled xamp to newly installed xamp)

可能你还没有删除主文件phpmyadmin你应该在xampp文件中搜索phpmyadmin并删除phpmyadmin并在你过去phpmyadmin之前再次删除文件,然后再确认你已经完全删除它 When you restore old mysql\data\ to new installed xamp, your newly installed xamp version must be same as old xamp version. Then only restore data will wor...

导入旧的mysql数据文件夹(Importing old mysql data folder)

如果数据位于正确的文件夹中,它将在MySQL中可见,否则服务器启动时将出现错误。 检查/var/log/messages和你的MySQL错误日志(在你的配置中定义)。 如果您没有收到任何错误并且看不到数据, my.cnf中的数据路径可能指向另一个文件夹。 If the data is in the correct folder, it will be visible in MySQL, or you will get errors when the server starts. Check /va...

将mysql数据与文件夹文件进行比较(Comparing mysql data with folder files)

我认为错误是在$ flag上,你没有在每次检查后重置$ flag。 因此,如果有一个文件等于DB上的文件,这使得$ flag为false,则其余文件将被视为等于,因为$ flag在此之后将始终为false。 最好使用strcmp来比较字符串,而不是使用“==”。 它更安全二进制。 I think the mistakes is on the $flag, you did not reset the $flag after each check. So if there is one file th...

Ubuntu MySQL:作业无法启动(Ubuntu MySQL: Job failed to start)

你能否检查一下你所有的配置文件,你必须在my.cnf中更改目录路径 另外,请确保您更改了mysqld的配置文件,这意味着您必须更新AppArmor配置文件,以便获取新目录。 检查此链接https://blogs.oracle.com/jsmyth/entry/apparmor_and_mysql 我希望这会奏效!! Can you check that you have set all your config file where you have to change directory path...

在Ubuntu上移动MYSQL数据文件夹(Move MYSQL data folder on Ubuntu)

问题在于Richard St-Cyr在给出文件夹777并遵循如何更改MySQL数据目录的提示后指出的权限? 我管理着解决问题! The problem was with the permission as pointed out by Richard St-Cyr after giving the folder 777 and following the tips at How to change MySQL data directory? i managged to solve the prob...

相关文章

更多

data-config

Data-config为solr的data-import处理器配置数据来源。 依次按照如下树状结构: ...

(二)solr data import

solr 的 data import 导入 mysql数据 (1)、编辑 example/solr/c ...

基于debian(ubuntu)的MySQL安装实录-vps环境搭建实录(四)

我们在前面已经安装好jdk,tomcat,nginx了,现在就差安装MYSQL了,过程如下...

Setting up Nutch 2.1 with MySQL to handle UTF-8

原文地址:http://nlp.solutions.asia/?p=180 These instruc ...

Ubuntu上Coreseek+PHP的安装

Coreseek是一个基于sphinx引擎,支持与mmseg中文分词模块合作完成中文的全文搜索引擎。相 ...

ubuntu下部署solr

IKAnalyzer linliangyi2007.javaeye.com http://code ...

ubuntu下部署solr

IKAnalyzer linliangyi2007.javaeye.com http://code ...

ubuntu下部署solr

IKAnalyzer linliangyi2007.javaeye.com http://code ...

ubuntu下部署solr

IKAnalyzer linliangyi2007.javaeye.com http://code ...

Ubuntu部署Hadoop

Ubuntu下创建Hadoop用户 sudouseradd-m-s/bin/bash ...

最新问答

更多

绝地求生、荒野行动、香肠派对 哪个更好玩???(都是吃鸡类游戏)

PC上的绝地求生,是最早也是最火的大逃杀游戏。 荒野行动是网易抄袭蓝洞绝地求生制作的手游。相似度90%,还有他一起出的终结折2,这2款正在被蓝洞告,打官司呢。 手游上的绝地求生有2部都是蓝洞授权(收钱)给腾讯开发的正版ID手游。所以跟PC上做的一模一样,蓝洞也没话说。 加上吃鸡国服也是腾讯独家代理,所以根本没有什么可说的。只要这个类型的 过于相似的,腾讯都可以借蓝洞之手起诉。打压同行是国内BAT最爱干的事嘛! 香肠派对画风虽然不一样,但核心玩法还是跟人家正版的一样的,同样也是没有被授权的。 98

如何在jQuery集合中选择第n个jQuery对象?(How to select the nth jQuery object in a jQuery collection?)

你可以使用eq : var rootElement = $('.grid').find('.box').eq(0); rootElement.find('.a'); /* Use chaining to do more work */ You can use eq: var rootElement = $('.grid').find('.box').eq(0); rootElement.find('.a'); /* Use chaining to do more work */

ASP NET使用jQuery和AJAX上传图像(ASP NET upload image with jQuery and AJAX)

您可以自己手动设置FormData键和值。 Upload 创建FormData并设置新的键/值 $("#btnUpload").on("click", function(e) { e.preventDefault(); var file = $("#imguploader").get(0).file

SQL Server XML查询中包含名称空间的位置(SQL Server XML query with namespaces in the where exist)

您可能希望使用#temp.identXml.query而不是#temp.identXml.query 。 您可以在这里阅读更多相关信息SQL Server XML exists() 我相信你也可以像这样使用它 Select #temp.identXml.value('(/*:PersonIdentity/*:MasterIndexes/*:PersonIndex/*:SourceIndex)[1]','varchar(100)') as Ident ,#temp.identXml.value(

宁夏银川永宁县望远镇哪里有修mp5的?

胜利街有家电维修,电脑城,银川商场多得很…

我想用更新的日期标记所有更新的行(I would like to mark all updated rows with the date that they have been updated)

您可以使用更新后触发的触发器来执行此操作。 给出如下表: create table your_table (id int primary key, val int, last_update datetime) 每当您更新表中的内容时,此触发器将设置last_update值。 CREATE TRIGGER trigger_name ON your_table AFTER UPDATE AS BEGIN UPDATE your_table SET your_ta

郑州会计培训班

招生的,至于时间吗,就看你自己的时间段了,你可以致电0371-63300220.他们会帮你选择一下的。离你最近,最专业的培训班。

如何定位数组中的负数,并得到所有正数的总和?(How to target e negative number from an array, and get the sum of all positive numbers?)

只需创建一个条件来检查它是正数还是负数,然后定义一个空的数组negatives ,如果数字是负数,则将其推到负数组中,如果是正数,则将其添加到sum变量中,请查看下面的工作示例。 function SummPositive( numbers ) { var negatives = []; var sum = 0; for(var i = 0; i < numbers.length; i++) { if(numbers[i] < 0) { negati

在响应图像上叠加网格(Overlay grid on responsive image)

使用两个linear-gradient s,我们可以创建两个简单的线条,然后每隔n%重复一次background-size 。 它看起来像这样: background: linear-gradient(to bottom, #000 2px, transparent 2px), linear-gradient(to right, #000 2px, transparent 2px); background-size: 10%; 两个渐变创建两条相交的线,长度为百分比,如下所示: 使用默认的b

无法让POST在Azure网站上运行(Could not get POST to work on Azure Website)

最后我找到了答案......我不得不删除尾随的斜线! 我使用了“ https://example.com/api/messages/ ”,这将自动产生GET,无论我使用PostAsync还是PostAsJsonAsync。 使用“ https://example.com/api/messages”,GET和POST似乎都运行良好! Finally I've found the answer.... I had to remove the trailing slash! I've used "ht